diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index d5f1db835..8c3deacaf 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -570,12 +570,12 @@ namespace libtorrent return; } m_remote = m_socket->remote_endpoint(ec); - TORRENT_ASSERT(m_remote.address() != address_v4::any()); if (ec) { disconnect(ec); return; } + TORRENT_ASSERT(m_remote.address() != address_v4::any()); if (m_remote.address().is_v4()) m_socket->set_option(type_of_service(m_ses.settings().peer_tos), ec); }