Software /
code /
prosody
Changeset
7736:5a07fe977002
net.server_select: Prevent writes after a handler is closed (fixes #783 I hope)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 22 Nov 2016 15:28:24 +0100 |
parents | 7713:003ee2be2635 |
children | 7738:0647b821e00a 7769:2a7b52437167 |
files | net/server_select.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_select.lua Thu Nov 03 23:51:40 2016 +0100 +++ b/net/server_select.lua Tue Nov 22 15:28:24 2016 +0100 @@ -415,6 +415,7 @@ end handler.port = handler.clientport -- COMPAT server_event local write = function( self, data ) + if not handler then return false end bufferlen = bufferlen + #data if bufferlen > maxsendlen then _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle