From 48f984ce06cdb3675bcf5f5c73143ce3f2e8014e 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(-) 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