Diff

net/server_event.lua @ 2303:ecbd68fc46db

net.server_event: Port fix in 2dc9bbf25447 to libevent-based backend
author Matthew Wild <mwild1@gmail.com>
date Thu, 03 Dec 2009 02:30:09 +0000
parent 2240:373e3fd8b862
child 2318:a831de056de3
line wrap: on
line diff
--- a/net/server_event.lua	Thu Dec 03 02:28:34 2009 +0000
+++ b/net/server_event.lua	Thu Dec 03 02:30:09 2009 +0000
@@ -572,6 +572,7 @@
 					interface.eventread = nil
 					return -1
 				end
+				interface.onincoming( interface, buffer, err )  -- send new data to listener
 				if err and ( err ~= "timeout" and err ~= "wantread" ) then
 					if "wantwrite" == err then -- need to read on write event
 						if not interface.eventwrite then  -- register new write event if needed
@@ -592,7 +593,6 @@
 						return -1
 					end
 				end
-				interface.onincoming( interface, buffer, err )  -- send new data to listener
 				return EV_READ, cfg.READ_TIMEOUT
 			end
 		end