diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-02 19:20:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-02 19:20:29 +0200 |
commit | 17a7b4529989553ff764917f84d42809aa0a3b06 (patch) | |
tree | 994b762add21e8950da2b38656529f38e1312208 | |
parent | 7980a9964c475c99b937c46a9c01c6e893a49f8c (diff) | |
download | prosody-17a7b4529989553ff764917f84d42809aa0a3b06.tar.gz prosody-17a7b4529989553ff764917f84d42809aa0a3b06.zip |
net.server_epoll: Handle connection being closed and destroyed in onconnect callback
-rw-r--r-- | net/server_epoll.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index b62bad83..e9d37426 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -336,6 +336,7 @@ end -- 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); |