aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-28 17:11:18 +0100
committerKim Alvefur <zash@zash.se>2018-10-28 17:11:18 +0100
commit5834d45f487f3875987620843914c47a3824feb7 (patch)
tree6ca6e7d299a3a492507322cdd1ed4e958befa746 /net/server_select.lua
parent556eddb7913324503e77bfdce49b8edb55cbc59f (diff)
downloadprosody-5834d45f487f3875987620843914c47a3824feb7.tar.gz
prosody-5834d45f487f3875987620843914c47a3824feb7.zip
net.server_select: Still allow buffering outgoing data on write-locked connections
Diffstat (limited to 'net/server_select.lua')
-rw-r--r--net/server_select.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 475f05b8..745e1f49 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -424,9 +424,8 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
bufferlen = bufferlen + #data
if bufferlen > maxsendlen then
_closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle
- handler.write = idfalse -- don't write anymore
return false
- elseif socket and not _sendlist[ socket ] then
+ elseif not nosend and socket and not _sendlist[ socket ] then
_sendlistlen = addsocket(_sendlist, socket, _sendlistlen)
end
bufferqueuelen = bufferqueuelen + 1
@@ -486,7 +485,6 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
out_error( "server.lua, lock() is deprecated" )
handler.lock_read (self, switch)
if switch == true then
- handler.write = idfalse
local tmp = _sendlistlen
_sendlistlen = removesocket( _sendlist, socket, _sendlistlen )
_writetimes[ handler ] = nil
@@ -494,7 +492,6 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
nosend = true
end
elseif switch == false then
- handler.write = write
if nosend then
nosend = false
write( "" )