diff --git a/lualib/skynet.lua b/lualib/skynet.lua index b26b4547..84c649e8 100644 --- a/lualib/skynet.lua +++ b/lualib/skynet.lua @@ -652,7 +652,9 @@ function skynet.exit() for address in pairs(tmp) do c.send(address, skynet.PTYPE_ERROR, 0, "") end - c.callback(function() end) + c.callback(function(prototype, msg, sz, session, source) + c.send(source, skynet.PTYPE_ERROR, session, "") + end) c.command("EXIT") -- quit service coroutine_yield "QUIT" diff --git a/skynet-src/skynet_server.c b/skynet-src/skynet_server.c index 4cc726e3..9f2a3593 100644 --- a/skynet-src/skynet_server.c +++ b/skynet-src/skynet_server.c @@ -118,7 +118,7 @@ drop_message(struct skynet_message *msg, void *ud) { uint32_t source = d->handle; assert(source); // report error to the message source - skynet_send(NULL, source, msg->source, PTYPE_ERROR, 0, NULL, 0); + skynet_send(NULL, source, msg->source, PTYPE_ERROR, msg->session, NULL, 0); } struct skynet_context *