aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-03 20:12:31 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-03 20:12:31 +0000
commit898101d2d846eb260c1675d8c1785e236b64dab2 (patch)
tree0f7e51e6233595c3f23733a39ac840ba23c6f8ac /net
parent0790a8d43e7f7e7e01b9a108971cb586e09dee7a (diff)
downloadprosody-898101d2d846eb260c1675d8c1785e236b64dab2.tar.gz
prosody-898101d2d846eb260c1675d8c1785e236b64dab2.zip
net.server: Check for potential nil handler on close
Diffstat (limited to 'net')
-rw-r--r--net/server.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/server.lua b/net/server.lua
index 8d0d3b1a..43b295e9 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -318,6 +318,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
return shutdown( socket, pattern )
end
handler.close = function( forced )
+ if not handler then return true; end
_readlistlen = removesocket( _readlist, socket, _readlistlen )
_readtimes[ handler ] = nil
if bufferqueuelen ~= 0 then