aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-04-11 01:20:20 +0100
committerMatthew Wild <mwild1@gmail.com>2010-04-11 01:20:20 +0100
commit41d92dbecaab314eded4335a905e0bf3dfa3b4a1 (patch)
tree6c979aee6120ad9d5bcb354a61b61b100aedea5c
parent8d3d5fb5d7c787738fc863bfba7c48c08c2d12f7 (diff)
parent6c9b44d6303ed41676b2bb8e9bc27c457fbd9fd9 (diff)
downloadprosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.tar.gz
prosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.zip
Merge 0.7->trunk
-rw-r--r--net/server_select.lua11
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