diff options
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index d2a1759b..f93809b4 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -499,8 +499,10 @@ function interface:write(data) self.writebuffer = { data }; end if not self._write_lock then - if cfg.opportunistic_writes then + if cfg.opportunistic_writes and not self._opportunistic_write then + self._opportunistic_write = true; self:onwritable(); + self._opportunistic_write = nil; return #data; end self:setwritetimeout(); |