Skip to content

Commit 3e2af60

Browse files
committed
bugfix: close pending socket when write_buffer drain
1 parent d5e9256 commit 3e2af60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

skynet-src/socket_server.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ send_buffer(struct socket_server *ss, struct socket *s, struct socket_message *r
347347
s->tail = NULL;
348348
sp_write(ss->event_fd, s->fd, s, false);
349349

350+
if (s->type == SOCKET_TYPE_HALFCLOSE) {
351+
force_close(ss, s, result);
352+
return SOCKET_CLOSE;
353+
}
354+
350355
return -1;
351356
}
352357

0 commit comments

Comments
 (0)