aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-02-18 21:02:41 +0000
committerMatthew Wild <mwild1@gmail.com>2009-02-18 21:02:41 +0000
commitb783d074206a70c3541fb3229ec3b1e20d38cdcf (patch)
treece54a42aefe1b3282d8bacc4c89b2687c555a3ed /net
parentac2f11fb5fbbe8111ce741e4509a73a71442f400 (diff)
parentb916691415f93c89a99fc7d4b62ff43addb0e28f (diff)
downloadprosody-b783d074206a70c3541fb3229ec3b1e20d38cdcf.tar.gz
prosody-b783d074206a70c3541fb3229ec3b1e20d38cdcf.zip
Automated merge with http://waqas.ath.cx:8000/
Diffstat (limited to 'net')
-rw-r--r--net/server.lua6
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