Diff

net/server_event.lua @ 7386:5a9af30d5737

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 17:32:22 +0200
parent 7341:aa94cd27df4d
parent 7385:17929cdacec2
child 7395:97fe648176ab
line wrap: on
line diff
--- a/net/server_event.lua	Tue Apr 19 17:10:42 2016 +0200
+++ b/net/server_event.lua	Tue Apr 19 17:32:22 2016 +0200
@@ -521,6 +521,10 @@
 				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
 				return -1
 			elseif byte and (err == "timeout" or err == "wantwrite") then  -- want write again