Changeset

7398:206f9b0485ad

net.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu usage introduced in 65abd9d7bf88)
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 18:58:30 +0200 (2016-04-19)
parents 7393:1909bde0e79f
children 7399:066a4dfdac18 7430:ad0b15f253ee
files net/server_event.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Tue Apr 19 18:20:39 2016 +0200
+++ b/net/server_event.lua	Tue Apr 19 18:58:30 2016 +0200
@@ -545,7 +545,7 @@
 					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