aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-12-16 23:31:43 +0000
committerMatthew Wild <mwild1@gmail.com>2013-12-16 23:31:43 +0000
commite727dbab3cf964330f74bfdd55ca57982c3a1420 (patch)
tree00f37f6e7128e0cfa525566dc118d62f67fc38e6 /net/server_select.lua
parente1a0bac6ccd3d881dfa0d3f665c799bb93807436 (diff)
downloadprosody-e727dbab3cf964330f74bfdd55ca57982c3a1420.tar.gz
prosody-e727dbab3cf964330f74bfdd55ca57982c3a1420.zip
net.server_select: Don't remove the socket from sendlist when we might have data in the buffer (we'll now let sendbuffer() take care of that) (thanks daurnimator)
Diffstat (limited to 'net/server_select.lua')
-rw-r--r--net/server_select.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index d0894715..22887265 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -916,13 +916,9 @@ local wrapclient = function( socket, ip, serverport, listeners, pattern, sslctx
-- When socket is writeable, call onconnect
local _sendbuffer = handler.sendbuffer;
handler.sendbuffer = function ()
- _sendlistlen = removesocket( _sendlist, socket, _sendlistlen );
handler.sendbuffer = _sendbuffer;
listeners.onconnect(handler);
- -- If there was data with the incoming packet, handle it now.
- if #handler:bufferqueue() > 0 then
- return _sendbuffer();
- end
+ return _sendbuffer(); -- Send any queued outgoing data
end
end
end