From 05f508fb42b2267a4512185b815a7a692d348530 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Sat, 11 Oct 2014 13:37:40 +0800 Subject: [PATCH] exit harbor before free socket --- skynet-src/skynet_start.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skynet-src/skynet_start.c b/skynet-src/skynet_start.c index a6a63e8b..5f511d29 100644 --- a/skynet-src/skynet_start.c +++ b/skynet-src/skynet_start.c @@ -232,9 +232,11 @@ skynet_start(struct skynet_config * config) { bootstrap(ctx, config->bootstrap); _start(config->thread); + + // harbor_exit may call socket send, so it should exit before socket_free + skynet_harbor_exit(); skynet_socket_free(); if (config->daemon) { daemon_exit(config->daemon); } - skynet_harbor_exit(); }