Revert "Update the return values of socket.listen, also return the real port bind to zero (#1638)"

This reverts commit c1eeba215d.
This commit is contained in:
Cloud Wu
2022-09-03 22:03:11 +08:00
parent 6dda5f7f98
commit 800a3376d6
10 changed files with 18 additions and 30 deletions

View File

@@ -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, port = socketdriver.listen(address, port)
socket = socketdriver.listen(address, port)
socketdriver.start(socket)
if handler.open then
return handler.open(source, conf, port)
return handler.open(source, conf)
end
end