net.server_select: Still allow buffering outgoing data on write-locked connections
--- 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( "" )