From 7ddc7c2258e29eb7fb4d422be009f3c35c9c490e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 4 Oct 2007 09:46:12 +0000 Subject: [PATCH] fast reconnect in case encrypted connection fails --- src/bt_peer_connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 71407d37f..56d9307a9 100755 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -202,6 +202,10 @@ namespace libtorrent // completes correctly pi->pe_support = false; + // if this fails, we need to reconnect + // fast. + pi->connected = time_now() - seconds(m_ses.settings().min_reconnect_time); + write_pe1_2_dhkey(); m_state = read_pe_dhkey; reset_recv_buffer(dh_key_len);