diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-02-19 13:13:54 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-02-19 13:13:54 +0000 |
commit | a562843a9b1e0a8eb70b68d871eeca6268173828 (patch) | |
tree | c49a590588f0d3bf66da67f6f7bd71277b2f68df /net | |
parent | 3b253992f156d8c91a1d9be6141349e032fa49bf (diff) | |
parent | b783d074206a70c3541fb3229ec3b1e20d38cdcf (diff) | |
download | prosody-a562843a9b1e0a8eb70b68d871eeca6268173828.tar.gz prosody-a562843a9b1e0a8eb70b68d871eeca6268173828.zip |
Automated merge with http://waqas.ath.cx:8000/
Diffstat (limited to 'net')
-rw-r--r-- | net/server.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/server.lua b/net/server.lua index a5c8e24c..cea2ada3 100644 --- a/net/server.lua +++ b/net/server.lua @@ -369,7 +369,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport end
bufferqueuelen = bufferqueuelen + 1
bufferqueue[ bufferqueuelen ] = data
- _writetimes[ handler ] = _writetimes[ handler ] or _currenttime
+ if handler then
+ _writetimes[ handler ] = _writetimes[ handler ] or _currenttime
+ end
return true
end
handler.write = write
@@ -470,7 +472,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport out_put( "server.lua: client ", ip, ":", clientport, " error: ", err )
fatalerror = true
disconnect( handler, err )
- handler.close( )
+ _ = handler and handler.close( )
return false
end
end
|