Changeset

775:d4b6714fc829

net.server: Fix nil table index assignment
author Matthew Wild <mwild1@gmail.com>
date Mon, 09 Feb 2009 14:24:49 +0000
parents 774:4885c6e101b4
children 776:89eb9f59993c
files net/server.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server.lua	Mon Feb 09 13:48:11 2009 +0000
+++ b/net/server.lua	Mon Feb 09 14:24:49 2009 +0000
@@ -362,7 +362,7 @@
             _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