diff --git a/src/ip_voter.cpp b/src/ip_voter.cpp index 7f4c75f1f..21129ec0f 100644 --- a/src/ip_voter.cpp +++ b/src/ip_voter.cpp @@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/ip_voter.hpp" #include "libtorrent/broadcast_socket.hpp" // for is_any() etc. #include "libtorrent/socket_io.hpp" // for hash_address +#include "libtorrent/random.hpp" // for random() #include diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 30ee92499..caff2c752 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -6096,7 +6096,7 @@ retry: , source_type, print_address(source).c_str()); #endif - if (!m_external_ip.cast_vote(ip, source_type, source)); + if (!m_external_ip.cast_vote(ip, source_type, source)) return; #if defined TORRENT_VERBOSE_LOGGING session_log(" external IP updated");