diff --git a/include/libtorrent/aux_/listen_socket_handle.hpp b/include/libtorrent/aux_/listen_socket_handle.hpp index 7e43db6b1..a6634471a 100644 --- a/include/libtorrent/aux_/listen_socket_handle.hpp +++ b/include/libtorrent/aux_/listen_socket_handle.hpp @@ -64,6 +64,8 @@ namespace libtorrent { namespace aux { : m_sock(s) {} + listen_socket_handle(listen_socket_handle const& o) = default; + explicit operator bool() const { return !m_sock.expired(); } address get_external_address() const; diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 1db32ba44..bd5df4fbe 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1227,7 +1227,7 @@ namespace { req.listen_port = listen_port(ls.get()); #ifdef TORRENT_USE_OPENSSL // SSL torrents use the SSL listen port - if (use_ssl) req.listen_port = ssl_listen_port(&ls); + if (use_ssl) req.listen_port = ssl_listen_port(ls.get()); #endif req.outgoing_socket = listen_socket_handle(ls); m_tracker_manager.queue_request(get_io_service(), req, c);