# HG changeset patch # User Kim Alvefur # Date 1356701607 -3600 # Node ID 1514a6147e8531903645804a3c89b9761b5713aa # Parent e8f7962056f50038cf2a21264808a0a5b14c214f net.server_select: Pause servers while they are full diff -r e8f7962056f5 -r 1514a6147e85 net/server_select.lua --- a/net/server_select.lua Fri Dec 28 14:33:27 2012 +0100 +++ b/net/server_select.lua Fri Dec 28 14:33:27 2012 +0100 @@ -185,6 +185,9 @@ end handler.remove = function( ) connections = connections - 1 + if handler then + handler.resume( ) + end end handler.close = function() socket:close( ) @@ -227,6 +230,7 @@ end handler.readbuffer = function( ) if connections > maxconnections then + handler.pause( ) out_put( "server.lua: refused new client connection: server full" ) return false end