Changeset

7395:97fe648176ab

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 18:23:44 +0200
parents 7391:c381106173d0 (current diff) 7394:a700d54c620a (diff)
children 7396:71a7140200fc
files net/server_event.lua
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Tue Apr 19 18:00:04 2016 +0200
+++ b/net/server_event.lua	Tue Apr 19 18:23:44 2016 +0200
@@ -518,11 +518,10 @@
 				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
+					-- data possibly written from ondrain
+					return EV_WRITE, cfg.WRITE_TIMEOUT
 				elseif interface.eventreadtimeout then
-					return EV_WRITE, EV_TIMEOUT
-				end
-				if interface.writebuffer ~= 0 then
-					-- data possibly written from ondrain
 					return EV_WRITE, cfg.WRITE_TIMEOUT
 				end
 				interface.eventwrite = nil