mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
修复client_number计数错误 (#1704)
This commit is contained in:
@@ -90,6 +90,7 @@ function gateserver.start(handler)
|
|||||||
MSG.more = dispatch_queue
|
MSG.more = dispatch_queue
|
||||||
|
|
||||||
function MSG.open(fd, msg)
|
function MSG.open(fd, msg)
|
||||||
|
client_number = client_number + 1
|
||||||
if client_number >= maxclient then
|
if client_number >= maxclient then
|
||||||
socketdriver.shutdown(fd)
|
socketdriver.shutdown(fd)
|
||||||
return
|
return
|
||||||
@@ -98,7 +99,6 @@ function gateserver.start(handler)
|
|||||||
socketdriver.nodelay(fd)
|
socketdriver.nodelay(fd)
|
||||||
end
|
end
|
||||||
connection[fd] = true
|
connection[fd] = true
|
||||||
client_number = client_number + 1
|
|
||||||
handler.connect(fd, msg)
|
handler.connect(fd, msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user