Software /
code /
prosody
Changeset
8776:e7d4344e0fea
net.server_epoll: Handle connection being closed and destroyed in onconnect callback
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 02 May 2018 19:20:29 +0200 |
parents | 8775:ae7cf011e46a |
children | 8777:2bfe963f3041 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Wed May 02 19:06:59 2018 +0200 +++ b/net/server_epoll.lua Wed May 02 19:20:29 2018 +0200 @@ -336,6 +336,7 @@ -- Called when socket is writable function interface:onwritable() self:onconnect(); + if not self.conn then return; end -- could have been closed in onconnect local buffer = self.writebuffer; local data = t_concat(buffer); local ok, err, partial = self.conn:send(data);