mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix: Issue #38
This commit is contained in:
@@ -21,3 +21,5 @@ skynet.start(function()
|
|||||||
skynet.exit()
|
skynet.exit()
|
||||||
print("Test timer exit")
|
print("Test timer exit")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
error "!!!"
|
||||||
@@ -244,8 +244,13 @@ skynet_mq_pushglobal(struct message_queue *queue) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
skynet_mq_mark_release(struct message_queue *q) {
|
skynet_mq_mark_release(struct message_queue *q) {
|
||||||
|
LOCK(q)
|
||||||
assert(q->release == 0);
|
assert(q->release == 0);
|
||||||
q->release = 1;
|
q->release = 1;
|
||||||
|
if (q->in_global != MQ_IN_GLOBAL) {
|
||||||
|
skynet_globalmq_push(q);
|
||||||
|
}
|
||||||
|
UNLOCK(q)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ skynet_context_new(const char * name, const char *param) {
|
|||||||
} else {
|
} else {
|
||||||
skynet_context_release(ctx);
|
skynet_context_release(ctx);
|
||||||
skynet_handle_retire(ctx->handle);
|
skynet_handle_retire(ctx->handle);
|
||||||
|
skynet_mq_release(queue);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user