diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-02-19 15:18:44 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-02-19 15:18:44 +0000 |
commit | ec92f62650b73c4fe87f61f9e4b68246239fc017 (patch) | |
tree | 2e65cd4208e9a2e7a479bd2b9dc691a9e28e2b18 /net/server.lua | |
parent | 3af91c3bf28a042b5ba08d085b3b4f1aefabb377 (diff) | |
parent | a562843a9b1e0a8eb70b68d871eeca6268173828 (diff) | |
download | prosody-ec92f62650b73c4fe87f61f9e4b68246239fc017.tar.gz prosody-ec92f62650b73c4fe87f61f9e4b68246239fc017.zip |
Automated merge with http://waqas.ath.cx:8000/
Diffstat (limited to 'net/server.lua')
-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
|