mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
Update the return values of socket.listen, also return the real port bind to zero (#1638)
This commit is contained in:
@@ -41,10 +41,10 @@ function gateserver.start(handler)
|
||||
maxclient = conf.maxclient or 1024
|
||||
nodelay = conf.nodelay
|
||||
skynet.error(string.format("Listen on %s:%d", address, port))
|
||||
socket = socketdriver.listen(address, port)
|
||||
socket, port = socketdriver.listen(address, port)
|
||||
socketdriver.start(socket)
|
||||
if handler.open then
|
||||
return handler.open(source, conf)
|
||||
return handler.open(source, conf, port)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user