aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-07-22 13:19:37 +0100
committerMatthew Wild <mwild1@gmail.com>2010-07-22 13:19:37 +0100
commit7ddf7d4745c571110a29a9e63d97c868ae154b73 (patch)
tree94cd165e64fcfe091212ed94db94716adc5f2ed6 /net
parent16fa172b23940ae510b85d6dde51625333757f2b (diff)
downloadprosody-7ddf7d4745c571110a29a9e63d97c868ae154b73.tar.gz
prosody-7ddf7d4745c571110a29a9e63d97c868ae154b73.zip
net.server_select: Remove 'now' parameter from starttls(), and base it on whether the sendbuffer is empty instead
Diffstat (limited to 'net')
-rw-r--r--net/server_select.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 12cbc621..51ae4e66 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -483,7 +483,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
if drain then
drain(handler)
end
- _ = needtls and handler:starttls(nil, true)
+ _ = needtls and handler:starttls(nil)
_ = toclose and handler:close( )
return true
elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write
@@ -564,13 +564,13 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
end
else
local sslctx;
- handler.starttls = function( self, _sslctx, now )
+ handler.starttls = function( self, _sslctx)
if _sslctx then
sslctx = _sslctx;
handler:set_sslctx(sslctx);
end
- if not now then
- out_put "server.lua: we need to do tls, but delaying until later"
+ if bufferqueuelen > 0 then
+ out_put "server.lua: we need to do tls, but delaying until send buffer empty"
needtls = true
return
end