diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-12-05 19:40:46 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-12-05 19:40:46 +0000 |
commit | b2afc52730ae023a4fa3c4da525b3d1f92e5f1b9 (patch) | |
tree | 9e36c615526c03c828610115c0f9b0c332e88de2 /net/server.lua | |
parent | 0d2b952b610069996f733700117a2e62d5b73696 (diff) | |
download | prosody-b2afc52730ae023a4fa3c4da525b3d1f92e5f1b9.tar.gz prosody-b2afc52730ae023a4fa3c4da525b3d1f92e5f1b9.zip |
Don't say we need TLS after we've already started the handshake
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/server.lua b/net/server.lua index d840d51b..7fdb3275 100644 --- a/net/server.lua +++ b/net/server.lua @@ -470,9 +470,6 @@ wraptlsclient = function( listener, socket, ip, serverport, clientport, mode, ss if handler.need_tls then out_put("server.lua: connection is ready for tls handshake"); handler.starttls(true); - if handler.need_tls then - out_put("server.lua: uh-oh... we still want tls, something must be wrong"); - end end return true elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write @@ -536,6 +533,7 @@ wraptlsclient = function( listener, socket, ip, serverport, clientport, mode, ss end handler.starttls = nil; + handler.need_tls = nil handler.handshake = coroutine_wrap( function( client ) local err @@ -546,7 +544,6 @@ wraptlsclient = function( listener, socket, ip, serverport, clientport, mode, ss writelen = ( wrote and removesocket( writelist, socket, writelen ) ) or writelen handler.receivedata = handler._receivedata -- when handshake is done, replace the handshake function with regular functions handler.dispatchdata = handler._dispatchdata - handler.need_tls = nil return true; else out_put( "server.lua: error during ssl handshake: ", err ) |