From c4da547259fc611c5b49b850e023fd611f41efed Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Fri, 15 Apr 2022 08:19:20 +0800 Subject: [PATCH] fix retireall, see #1576 --- skynet-src/skynet_handle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skynet-src/skynet_handle.c b/skynet-src/skynet_handle.c index 249748a2..28bd1efe 100644 --- a/skynet-src/skynet_handle.c +++ b/skynet-src/skynet_handle.c @@ -121,13 +121,13 @@ skynet_handle_retireall() { rwlock_rlock(&s->lock); struct skynet_context * ctx = s->slot[i]; uint32_t handle = 0; - if (ctx) + if (ctx) { handle = skynet_context_handle(ctx); + ++n; + } rwlock_runlock(&s->lock); if (handle != 0) { - if (skynet_handle_retire(handle)) { - ++n; - } + skynet_handle_retire(handle); } } if (n==0)