diff --git a/libtorrent/src/bt_peer_connection.cpp b/libtorrent/src/bt_peer_connection.cpp index 71407d37f..56d9307a9 100755 --- a/libtorrent/src/bt_peer_connection.cpp +++ b/libtorrent/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); diff --git a/libtorrent/src/disk_io_thread.cpp b/libtorrent/src/disk_io_thread.cpp index 112e76927..ea177b58d 100644 --- a/libtorrent/src/disk_io_thread.cpp +++ b/libtorrent/src/disk_io_thread.cpp @@ -314,4 +314,3 @@ namespace libtorrent } } - diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 83f1d32f7..327bb2074 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -739,6 +739,14 @@ namespace libtorrent m_allowed_fast.begin(), m_allowed_fast.end(), r.piece); if (i != m_allowed_fast.end()) m_allowed_fast.erase(i); } + else + { + std::vector::iterator i = std::find(m_suggested_pieces.begin() + , m_suggested_pieces.end(), r.piece); + if (i != m_suggested_pieces.end()) + m_suggested_pieces.erase(i); + } + if (m_request_queue.empty()) { if (m_download_queue.size() < 2) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 2eed1c328..5734225e0 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -1597,11 +1597,6 @@ namespace detail { assert(!save_path.empty()); - // if you get this assert, you haven't managed to - // open a listen port. call listen_on() first. - if (m_listen_sockets.empty()) - throw std::runtime_error("no listen socket opened"); - if (ti->begin_files() == ti->end_files()) throw std::runtime_error("no files in torrent");