Software /
code /
prosody
Comparison
net/server.lua @ 775:d4b6714fc829
net.server: Fix nil table index assignment
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 09 Feb 2009 14:24:49 +0000 |
parent | 773:c36edc1934c5 |
child | 815:cf8392613f46 |
comparison
equal
deleted
inserted
replaced
774:4885c6e101b4 | 775:d4b6714fc829 |
---|---|
360 bufferlen = bufferlen + string_len( data ) | 360 bufferlen = bufferlen + string_len( data ) |
361 if bufferlen > maxsendlen then | 361 if bufferlen > maxsendlen then |
362 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle | 362 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle |
363 handler.write = idfalse -- dont write anymore | 363 handler.write = idfalse -- dont write anymore |
364 return false | 364 return false |
365 elseif not _sendlist[ socket ] then | 365 elseif socket and not _sendlist[ socket ] then |
366 _sendlistlen = _sendlistlen + 1 | 366 _sendlistlen = _sendlistlen + 1 |
367 _sendlist[ _sendlistlen ] = socket | 367 _sendlist[ _sendlistlen ] = socket |
368 _sendlist[ socket ] = _sendlistlen | 368 _sendlist[ socket ] = _sendlistlen |
369 end | 369 end |
370 bufferqueuelen = bufferqueuelen + 1 | 370 bufferqueuelen = bufferqueuelen + 1 |