aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 90d3929f..ec2dd5b8 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -573,7 +573,7 @@ interface.send = interface.write;
-- Close, possibly after writing is done
function interface:close()
- if self.writebuffer and (self.writebuffer[1] or type(self.writebuffer) == "string") then
+ if self._connected and self.writebuffer and (self.writebuffer[1] or type(self.writebuffer) == "string") then
self:set(false, true); -- Flush final buffer contents
self:setreadtimeout(false);
self:setwritetimeout();