Changeset

2941:a2b01936f8f9

net.server_event: Don't re-try a write if the connection closed (thanks Flo)
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Mar 2010 12:32:25 +0000
parents 2939:dc73cbc69bd5
children 2942:29ec7cd77f81 2943:9236a7856688
files net/server_event.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Wed Mar 24 22:46:57 2010 +0000
+++ b/net/server_event.lua	Thu Mar 25 12:32:25 2010 +0000
@@ -535,7 +535,7 @@
 					end
 					interface.eventwrite = nil
 					return -1
-				elseif byte then  -- want write again
+				elseif byte and (err == "timeout" or err == "wantwrite") then  -- want write again
 					--vdebug( "writebuffer is not empty:", err )
 					interface.writebuffer = string_sub( interface.writebuffer, byte + 1, interface.writebufferlen )  -- new buffer
 					interface.writebufferlen = interface.writebufferlen - byte