diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-18 16:05:18 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-18 16:05:18 +0200 |
commit | 97bb48b578078377edb640a42284b73f456be1f5 (patch) | |
tree | d712dfbe3c5af7ec9bfbcc7a8648df1743063de7 /net | |
parent | a82b468344b665baab4a02c642bf9f6270c77e90 (diff) | |
download | prosody-97bb48b578078377edb640a42284b73f456be1f5.tar.gz prosody-97bb48b578078377edb640a42284b73f456be1f5.zip |
net.server_epoll: Don't call ondrain when connection is to be closed
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index d765f35b..b2df6188 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -307,11 +307,12 @@ function interface:onwriteable() end function interface:ondrain() - self:on("drain"); - if self._starttls then - self:starttls(); - elseif self._toclose then - self:close(); + if self._toclose then + return self:close(); + elseif self._starttls then + return self:starttls(); + else + return self:on("drain"); end end |