# HG changeset patch # User Kim Alvefur # Date 1598213969 -7200 # Node ID d105e787f5ed0c10169d87e1c96a83a9328d0ebf # Parent 8a243ab49cb5cf6bdb8993bc231498242b0febca 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. diff -r 8a243ab49cb5 -r d105e787f5ed net/server_select.lua --- a/net/server_select.lua Sat Aug 22 14:34:57 2020 +0200 +++ b/net/server_select.lua Sun Aug 23 22:19:29 2020 +0200 @@ -511,7 +511,7 @@ 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