diff options
author | Kim Alvefur <zash@zash.se> | 2013-06-09 17:00:26 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-06-09 17:00:26 +0200 |
commit | 4675a091eb6a3f877c47b95f03026b8688c66d05 (patch) | |
tree | 8fe6725c3107c0a9ef25dd6c251e1a0e63f0b630 /net/server_select.lua | |
parent | d06cad4628a71be0165a9c5261fcb59399af0feb (diff) | |
download | prosody-4675a091eb6a3f877c47b95f03026b8688c66d05.tar.gz prosody-4675a091eb6a3f877c47b95f03026b8688c66d05.zip |
net.server_select: Make sure there is a server to pause when hitting maxfd (Thanks elghinn)
Diffstat (limited to 'net/server_select.lua')
-rw-r--r-- | net/server_select.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/server_select.lua b/net/server_select.lua index a6e91d0b..d0894715 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -263,7 +263,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport if socket:getfd() >= _maxfd then out_error("server.lua: Disallowed FD number: "..socket:getfd()) -- PROTIP: Switch to libevent socket:close( ) -- Should we send some kind of error here? - server.pause( ) + if server then + server.pause( ) + end return nil, nil, "fd-too-large" end socket:settimeout( 0 ) |