# HG changeset patch # User Kim Alvefur # Date 1540743078 -3600 # Node ID 5fe91bfb734cb050fdfc17dfcc3074a71a9ab93e # Parent 185eed6cbab0d2a14b1b3d4234ad5d44f6c9f4b7 net.server_select: Still allow buffering outgoing data on write-locked connections diff -r 185eed6cbab0 -r 5fe91bfb734c net/server_select.lua --- 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( "" )