Diff

net/server_select.lua @ 5950:bd1d1c29a7e7

Merge 0.9->0.10
author Matthew Wild <mwild1@gmail.com>
date Mon, 16 Dec 2013 23:32:11 +0000
parent 5846:b8c7656481ac
parent 5949:a9abbdeddbf3
child 5956:59997f3f5502
child 6054:7a5ddbaf758d
line wrap: on
line diff
--- a/net/server_select.lua	Mon Dec 16 02:04:16 2013 +0000
+++ b/net/server_select.lua	Mon Dec 16 23:32:11 2013 +0000
@@ -920,13 +920,9 @@
 			-- When socket is writeable, call onconnect
 			local _sendbuffer = handler.sendbuffer;
 			handler.sendbuffer = function ()
-				_sendlistlen = removesocket( _sendlist, socket, _sendlistlen );
 				handler.sendbuffer = _sendbuffer;
 				listeners.onconnect(handler);
-				-- If there was data with the incoming packet, handle it now.
-				if #handler:bufferqueue() > 0 then
-					return _sendbuffer();
-				end
+				return _sendbuffer(); -- Send any queued outgoing data
 			end
 		end
 	end