From a31f68cb0df7a56f3e516377992df4d25f90395a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 19 Apr 2016 18:58:30 +0200 Subject: net.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu usage introduced in 65abd9d7bf88) --- net/server_event.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_event.lua b/net/server_event.lua index 59bd269a..882d10ed 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -545,7 +545,7 @@ do elseif interface.startsslcallback then -- start ssl connection if needed debug "starting ssl handshake after writing" interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 ) - elseif interface.writebuffer ~= 0 then + elseif interface.writebufferlen ~= 0 then -- data possibly written from ondrain return EV_WRITE, cfg.WRITE_TIMEOUT elseif interface.eventreadtimeout then -- cgit v1.2.3