bugfix: close pending socket when write_buffer drain

This commit is contained in:
Kezhu Wang
2013-11-14 01:22:03 +08:00
parent d5e925688f
commit 3e2af60b34

View File

@@ -347,6 +347,11 @@ send_buffer(struct socket_server *ss, struct socket *s, struct socket_message *r
s->tail = NULL;
sp_write(ss->event_fd, s->fd, s, false);
if (s->type == SOCKET_TYPE_HALFCLOSE) {
force_close(ss, s, result);
return SOCKET_CLOSE;
}
return -1;
}