aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-08-23 22:19:29 +0200
committerKim Alvefur <zash@zash.se>2020-08-23 22:19:29 +0200
commit33d00845e771884c54d6e1631646e60a2bb9c6ef (patch)
tree1be37e18b6983b550658963c43a7b6ad752bc8a7 /net/server_select.lua
parent6c5dd70664236b524f3b2524f3ed48cbc8f0bc42 (diff)
downloadprosody-33d00845e771884c54d6e1631646e60a2bb9c6ef.tar.gz
prosody-33d00845e771884c54d6e1631646e60a2bb9c6ef.zip
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.
Diffstat (limited to 'net/server_select.lua')
-rw-r--r--net/server_select.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index a2515d59..09c1c027 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -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