diff options
author | Kim Alvefur <zash@zash.se> | 2020-08-23 22:19:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-08-23 22:19:29 +0200 |
commit | 2238804d7aece8e7a64e03f822b5106f932ea683 (patch) | |
tree | 1be37e18b6983b550658963c43a7b6ad752bc8a7 /net | |
parent | b6e1f9feb9e17f0c430683318b475aa806058955 (diff) | |
download | prosody-2238804d7aece8e7a64e03f822b5106f932ea683.tar.gz prosody-2238804d7aece8e7a64e03f822b5106f932ea683.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')
-rw-r--r-- | net/server_select.lua | 2 |
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 |