fix: don't retry plain handshake in `AwaitingVc` state (#6969)
This commit is contained in:
parent
819d7f4136
commit
b5cc6916ef
|
@ -664,8 +664,8 @@ void tr_handshake::on_error(tr_peerIo* io, tr_error const& error, void* vhandsha
|
||||||
/* if the error happened while we were sending a public key, we might
|
/* if the error happened while we were sending a public key, we might
|
||||||
* have encountered a peer that doesn't do encryption... reconnect and
|
* have encountered a peer that doesn't do encryption... reconnect and
|
||||||
* try a plaintext handshake */
|
* try a plaintext handshake */
|
||||||
if ((handshake->is_state(State::AwaitingYb) || handshake->is_state(State::AwaitingVc)) &&
|
if (handshake->is_state(State::AwaitingYb) && handshake->encryption_mode_ != TR_ENCRYPTION_REQUIRED &&
|
||||||
handshake->encryption_mode_ != TR_ENCRYPTION_REQUIRED && handshake->mediator_->allows_tcp() && io->reconnect())
|
handshake->mediator_->allows_tcp() && io->reconnect())
|
||||||
{
|
{
|
||||||
tr_logAddTraceHand(handshake, "handshake failed, trying plaintext...");
|
tr_logAddTraceHand(handshake, "handshake failed, trying plaintext...");
|
||||||
retry();
|
retry();
|
||||||
|
|
Loading…
Reference in New Issue