diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-04-11 01:20:20 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-04-11 01:20:20 +0100 |
commit | 41d92dbecaab314eded4335a905e0bf3dfa3b4a1 (patch) | |
tree | 6c979aee6120ad9d5bcb354a61b61b100aedea5c | |
parent | 8d3d5fb5d7c787738fc863bfba7c48c08c2d12f7 (diff) | |
parent | 6c9b44d6303ed41676b2bb8e9bc27c457fbd9fd9 (diff) | |
download | prosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.tar.gz prosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.zip |
Merge 0.7->trunk
-rw-r--r-- | net/server_select.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/server_select.lua b/net/server_select.lua index ebf5c427..48262ccc 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -611,7 +611,16 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport _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 |