I think that the socket is invalid, the return should be -1.

This commit is contained in:
冉正源 2014-03-19 22:32:41 +08:00
parent 6a46244a21
commit 3ea3b8dfa4

View File

@ -769,7 +769,7 @@ int ns_server_poll(struct ns_server *server, int milli) {
time_t current_time = time(NULL);
if (server->listening_sock == INVALID_SOCKET &&
server->active_connections == NULL) return 0;
server->active_connections == NULL) return -1;
FD_ZERO(&read_set);
FD_ZERO(&write_set);