From c2b9a5eaaa9da73ec38141f13fe86dfa75fa818d Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Mon, 10 Sep 2007 17:15:48 +0000 Subject: [PATCH] listen port tweak --- libtorrent/src/session_impl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 102bcf6cd..6d781e6fb 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -666,14 +666,14 @@ namespace detail try { // create listener socket - m_listen_socket.reset(new socket_acceptor(m_io_service)); - m_listen_socket->set_option(socket_acceptor::reuse_address(true)); + m_listen_socket.reset(new socket_acceptor(m_io_service)); for(;;) { try { m_listen_socket->open(m_listen_interface.protocol()); + m_listen_socket->set_option(socket_acceptor::reuse_address(true)); m_listen_socket->bind(m_listen_interface); m_listen_socket->listen(); m_external_listen_port = m_listen_interface.port(); @@ -2380,3 +2380,4 @@ namespace detail } }} +