mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
fix retireall, see #1576
This commit is contained in:
@@ -121,13 +121,13 @@ skynet_handle_retireall() {
|
|||||||
rwlock_rlock(&s->lock);
|
rwlock_rlock(&s->lock);
|
||||||
struct skynet_context * ctx = s->slot[i];
|
struct skynet_context * ctx = s->slot[i];
|
||||||
uint32_t handle = 0;
|
uint32_t handle = 0;
|
||||||
if (ctx)
|
if (ctx) {
|
||||||
handle = skynet_context_handle(ctx);
|
handle = skynet_context_handle(ctx);
|
||||||
rwlock_runlock(&s->lock);
|
|
||||||
if (handle != 0) {
|
|
||||||
if (skynet_handle_retire(handle)) {
|
|
||||||
++n;
|
++n;
|
||||||
}
|
}
|
||||||
|
rwlock_runlock(&s->lock);
|
||||||
|
if (handle != 0) {
|
||||||
|
skynet_handle_retire(handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n==0)
|
if (n==0)
|
||||||
|
|||||||
Reference in New Issue
Block a user