diff --git a/skynet-src/socket_server.c b/skynet-src/socket_server.c index c73a70db..eceaf593 100644 --- a/skynet-src/socket_server.c +++ b/skynet-src/socket_server.c @@ -1446,9 +1446,10 @@ socket_server_send(struct socket_server *ss, int id, const void * buffer, int sz s->dw_buffer = buffer; s->dw_size = sz; s->dw_offset = n; - spinlock_unlock(&s->dw_lock); sp_write(ss->event_fd, s->fd, s, true); + + spinlock_unlock(&s->dw_lock); return 0; } spinlock_unlock(&s->dw_lock);