aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
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 /net/server_select.lua
parent8d3d5fb5d7c787738fc863bfba7c48c08c2d12f7 (diff)
parent6c9b44d6303ed41676b2bb8e9bc27c457fbd9fd9 (diff)
downloadprosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.tar.gz
prosody-41d92dbecaab314eded4335a905e0bf3dfa3b4a1.zip
Merge 0.7->trunk
Diffstat (limited to 'net/server_select.lua')
-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