aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_select.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 97c29b8c..97b9f199 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -185,6 +185,9 @@ wrapserver = function( listeners, socket, ip, serverport, pattern, sslctx, maxco
end
handler.remove = function( )
connections = connections - 1
+ if handler then
+ handler.resume( )
+ end
end
handler.close = function()
socket:close( )
@@ -227,6 +230,7 @@ wrapserver = function( listeners, socket, ip, serverport, pattern, sslctx, maxco
end
handler.readbuffer = function( )
if connections > maxconnections then
+ handler.pause( )
out_put( "server.lua: refused new client connection: server full" )
return false
end