diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/server.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/server.lua b/net/server.lua index 9d178cb2..e01ddfb7 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 @@ -525,6 +522,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 @@ -534,11 +532,7 @@ wraptlsclient = function( listener, socket, ip, serverport, clientport, mode, ss out_put( "server.lua: ssl handshake done" ) 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 - socketlist[ client ] = handler - readlen = readlen + 1 - readlist[ readlen ] = client + handler.dispatchdata = handler._dispatchdata; return true; else out_put( "server.lua: error during ssl handshake: ", err ) |