mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix: retire an unexist handle
This commit is contained in:
@@ -73,7 +73,7 @@ skynet_handle_retire(uint32_t handle) {
|
|||||||
uint32_t hash = handle & (s->slot_size-1);
|
uint32_t hash = handle & (s->slot_size-1);
|
||||||
struct skynet_context * ctx = s->slot[hash];
|
struct skynet_context * ctx = s->slot[hash];
|
||||||
|
|
||||||
if (skynet_context_handle(ctx) == handle) {
|
if (ctx != NULL && skynet_context_handle(ctx) == handle) {
|
||||||
skynet_context_release(ctx);
|
skynet_context_release(ctx);
|
||||||
s->slot[hash] = NULL;
|
s->slot[hash] = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user