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.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 89b36233..24678842 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -612,6 +612,8 @@ function interface:write(data)
-- Try to flush buffer to make room
self:onwritable();
if not buffer:write(prev_buffer) then
+ self:on("disconnect", "no space left in buffer");
+ self:destroy();
return false;
end
end
@@ -622,6 +624,8 @@ function interface:write(data)
end
self:onwritable();
if not buffer:write(data) then
+ self:on("disconnect", "no space left in buffer");
+ self:destroy();
return false;
end
end
@@ -631,6 +635,8 @@ function interface:write(data)
end
self:onwritable();
if not buffer:write(data) then
+ self:on("disconnect", "no space left in buffer");
+ self:destroy();
return false;
end
end