aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua11
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