diff --git a/skynet-src/skynet_server.c b/skynet-src/skynet_server.c index 329221f9..b6da1834 100644 --- a/skynet-src/skynet_server.c +++ b/skynet-src/skynet_server.c @@ -356,12 +356,12 @@ skynet_queryname(struct skynet_context * context, const char * name) { static void handle_exit(struct skynet_context * context, uint32_t handle) { - if (G_NODE.monitor_exit) { - skynet_send(context, handle, G_NODE.monitor_exit, PTYPE_CLIENT, 0, NULL, 0); - } if (handle == 0) { handle = context->handle; } + if (G_NODE.monitor_exit) { + skynet_send(context, handle, G_NODE.monitor_exit, PTYPE_CLIENT, 0, NULL, 0); + } skynet_handle_retire(handle); }