Software /
code /
prosody
Comparison
net/server.lua @ 1546:7d7bf705675d
net.server: Initiate the handshake when we should, the more correcter fix for the previous correct fix
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 21:17:51 +0100 |
parent | 1544:c7f0938bc33e |
child | 1570:a46453758631 |
comparison
equal
deleted
inserted
replaced
1544:c7f0938bc33e | 1546:7d7bf705675d |
---|---|
534 return nil, nil, err -- fatal error | 534 return nil, nil, err -- fatal error |
535 end | 535 end |
536 socket:settimeout( 0 ) | 536 socket:settimeout( 0 ) |
537 handler.readbuffer = handshake | 537 handler.readbuffer = handshake |
538 handler.sendbuffer = handshake | 538 handler.sendbuffer = handshake |
539 if not socket then -- do handshake | 539 handshake( socket ) -- do handshake |
540 if not socket then | |
540 return nil, nil, "ssl handshake failed"; | 541 return nil, nil, "ssl handshake failed"; |
541 end | 542 end |
542 else | 543 else |
543 -- We're not automatically doing SSL, so we're not secure (yet) | 544 -- We're not automatically doing SSL, so we're not secure (yet) |
544 ssl = false | 545 ssl = false |