Software /
code /
prosody
Changeset
11043:d105e787f5ed
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 23 Aug 2020 22:19:29 +0200 |
parents | 11042:8a243ab49cb5 |
children | 11044:7b720a815519 |
files | net/server_select.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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