Software /
code /
prosody
Changeset
7588:fd6ca110edce
net.server_epoll: Don't call ondrain when connection is to be closed
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Aug 2016 16:05:18 +0200 |
parents | 7587:ff81a34bffb0 |
children | 7589:125e4f2e0b65 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Thu Aug 18 16:02:20 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 16:05:18 2016 +0200 @@ -307,11 +307,12 @@ 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