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 | 136c504e7bccb339b34b3ba137245afd588b856a (patch) | |
tree | d712dfbe3c5af7ec9bfbcc7a8648df1743063de7 /net/server_epoll.lua | |
parent | 126c1d480fcd8198f92ed30de2b0f96fe907c4d7 (diff) | |
download | prosody-136c504e7bccb339b34b3ba137245afd588b856a.tar.gz prosody-136c504e7bccb339b34b3ba137245afd588b856a.zip |
net.server_epoll: Don't call ondrain when connection is to be closed
Diffstat (limited to 'net/server_epoll.lua')
-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 |