mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Update the return values of socket.listen, also return the real port bind to zero (#1638)
This commit is contained in:
@@ -331,7 +331,7 @@ start_listen(struct gate *g, char * listen_addr) {
|
||||
portstr[0] = '\0';
|
||||
host = listen_addr;
|
||||
}
|
||||
g->listen_id = skynet_socket_listen(ctx, host, port, BACKLOG);
|
||||
g->listen_id = skynet_socket_listen(ctx, host, &port, BACKLOG);
|
||||
if (g->listen_id < 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user