Software /
code /
prosody
Changeset
5663:4e51ceee469c
net.server_select: Make sure there is a server to pause when hitting maxfd (Thanks elghinn)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Jun 2013 17:00:26 +0200 |
parents | 5650:aa3465183b01 |
children | 5664:4f499eb63c04 5665:da1881e1b35b |
files | net/server_select.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_select.lua Fri Jun 07 13:22:13 2013 +0100 +++ b/net/server_select.lua Sun Jun 09 17:00:26 2013 +0200 @@ -263,7 +263,9 @@ 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 )