bugfix: mistake return value from send_buffer

same with SOCKET_DATA, when it is propagated to
skynet_socket_poll(), may crash the program
This commit is contained in:
Kezhu Wang
2013-11-14 00:42:55 +08:00
parent ec13a89ee4
commit f3a23a9485

View File

@@ -328,7 +328,7 @@ send_buffer(struct socket_server *ss, struct socket *s, struct socket_message *r
case EINTR: case EINTR:
continue; continue;
case EAGAIN: case EAGAIN:
return 0; return -1;
} }
force_close(ss,s, result); force_close(ss,s, result);
return SOCKET_CLOSE; return SOCKET_CLOSE;