# HG changeset patch # User Matthew Wild # Date 1228506634 0 # Node ID c8316692783503c0c899e7daf14337da8d10c0e3 # Parent 779ab5b99e13d4c040ba355760de4fedefdf9047# Parent 3a49d85cafbcb510c86ffdafcef44e65739a44d0 Merge diff -r 3a49d85cafbc -r c83166927835 net/server.lua --- a/net/server.lua Fri Dec 05 19:49:16 2008 +0000 +++ b/net/server.lua Fri Dec 05 19:50:34 2008 +0000 @@ -470,9 +470,6 @@ 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 @@ end handler.starttls = nil; + handler.need_tls = nil handler.handshake = coroutine_wrap( function( client ) local err @@ -534,11 +532,7 @@ 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 )