# HG changeset patch # User Matthew Wild # Date 1270945220 -3600 # Node ID e21c546368bd07ca6a768fa5cecb4c17b0b86a67 # Parent 81991c04a056d09420dd0810baf0971b0e3a07f0# Parent 9b8e139eff5fe5fa2887e3cfa71b3cd9fb6ed201 Merge 0.7->trunk diff -r 81991c04a056 -r e21c546368bd net/server_select.lua --- a/net/server_select.lua Fri Apr 09 12:32:25 2010 +0100 +++ b/net/server_select.lua Sun Apr 11 01:20:20 2010 +0100 @@ -611,7 +611,16 @@ _socketlist[ socket ] = handler _readlistlen = addsocket(_readlist, socket, _readlistlen) - + if listeners.onconnect then + _sendlistlen = addsocket(_sendlist, socket, _sendlistlen) + handler.sendbuffer = function () + listeners.onconnect(handler); + handler.sendbuffer = _sendbuffer; + if bufferqueuelen > 0 then + return _senddbuffer(); + end + end + end return handler, socket end