diff --git a/lualib/snax/gateserver.lua b/lualib/snax/gateserver.lua index 75cd6e54..ee438637 100644 --- a/lualib/snax/gateserver.lua +++ b/lualib/snax/gateserver.lua @@ -90,6 +90,7 @@ function gateserver.start(handler) MSG.more = dispatch_queue function MSG.open(fd, msg) + client_number = client_number + 1 if client_number >= maxclient then socketdriver.shutdown(fd) return @@ -98,7 +99,6 @@ function gateserver.start(handler) socketdriver.nodelay(fd) end connection[fd] = true - client_number = client_number + 1 handler.connect(fd, msg) end