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