aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-19 18:58:30 +0200
committerKim Alvefur <zash@zash.se>2016-04-19 18:58:30 +0200
commit9f66da1df03bf056fb96f3b7c252e194bdcd6170 (patch)
treed08b53cf25aca5a46865c0ccb5eaa7505685abd4 /net/server_event.lua
parent376dab8b5e1303db5400fda48a113b60c540d069 (diff)
downloadprosody-9f66da1df03bf056fb96f3b7c252e194bdcd6170.tar.gz
prosody-9f66da1df03bf056fb96f3b7c252e194bdcd6170.zip
net.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu usage introduced in 65abd9d7bf88)
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua2
1 files changed, 1 insertions, 1 deletions
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