net.server_select: Fix traceback (thanks eta)

The `socket` here is unreferenced on disconnect.  Calling :resume_writes
after that causes an error when `addsocket()` tries to use it as a table
index.
This commit is contained in:
Kim Alvefur 2020-08-23 22:19:29 +02:00
parent 6c5dd70664
commit 33d00845e7

View file

@ -511,7 +511,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
end
handler.resume_writes = function (self)
nosend = false
if bufferlen > 0 then
if bufferlen > 0 and socket then
_sendlistlen = addsocket(_sendlist, socket, _sendlistlen)
end
end