diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-04-20 03:03:07 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-04-20 03:03:07 +0100 |
commit | dabd9b0b5364630a603daecd3261d45999eff3c7 (patch) | |
tree | dc7e3765689e50d37e541743d7e88ba9f0144b0d /net/server.lua | |
parent | f0a842ae4bcf5b7d09a08b65275e4b828838cfe5 (diff) | |
parent | cface37b4928e922a43ef37d1bc49ab3a4009479 (diff) | |
download | prosody-dabd9b0b5364630a603daecd3261d45999eff3c7.tar.gz prosody-dabd9b0b5364630a603daecd3261d45999eff3c7.zip |
Merging stable into unstable
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/server.lua b/net/server.lua index 0097be3c..77bc2f5c 100644 --- a/net/server.lua +++ b/net/server.lua @@ -325,7 +325,9 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport if not ( forced or fatalerror ) then
handler.sendbuffer( )
if bufferqueuelen ~= 0 then -- try again...
- handler.write = nil -- ... but no further writing allowed
+ if handler then
+ handler.write = nil -- ... but no further writing allowed
+ end
toclose = true
return false
end
@@ -337,9 +339,11 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport socket:close( )
_sendlistlen = removesocket( _sendlist, socket, _sendlistlen )
_socketlist[ socket ] = nil
- _writetimes[ handler ] = nil
- _closelist[ handler ] = nil
- handler = nil
+ if handler then
+ _writetimes[ handler ] = nil
+ _closelist[ handler ] = nil
+ handler = nil
+ end
socket = nil
mem_free( )
if server then
|