Software /
code /
prosody
Changeset
9580:5fe91bfb734c
net.server_select: Still allow buffering outgoing data on write-locked connections
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Oct 2018 17:11:18 +0100 |
parents | 9579:185eed6cbab0 |
children | 9581:1be99aedb0b3 |
files | net/server_select.lua |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_select.lua Sun Oct 28 17:08:50 2018 +0100 +++ b/net/server_select.lua Sun Oct 28 17:11:18 2018 +0100 @@ -424,9 +424,8 @@ 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 @@ 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 @@ nosend = true end elseif switch == false then - handler.write = write if nosend then nosend = false write( "" )