aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server.lua b/net/server.lua
index 0a0f8492..a5c8e24c 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -362,7 +362,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
_closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle
handler.write = idfalse -- dont write anymore
return false
- elseif not _sendlist[ socket ] then
+ elseif socket and not _sendlist[ socket ] then
_sendlistlen = _sendlistlen + 1
_sendlist[ _sendlistlen ] = socket
_sendlist[ socket ] = _sendlistlen
@@ -439,7 +439,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