From 6579ae19941f323e9b0988f21a3b5fc55c8ccd14 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 27 Nov 2016 16:19:39 -0500 Subject: [PATCH] fix listen_failed_alert socket_type report bug --- src/session_impl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 7b50ddbde..1cd8e652f 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1631,6 +1631,11 @@ namespace aux { } } // force-proxy mode + socket_type_t const udp_sock_type + = (flags & open_ssl_socket) + ? socket_type_t::utp_ssl + : socket_type_t::udp; + ret.udp_sock = std::make_shared(m_io_service); #if TORRENT_HAS_BINDTODEVICE if (!device.empty()) @@ -1650,7 +1655,7 @@ namespace aux { if (m_alerts.should_post()) { m_alerts.emplace_alert(device, bind_ep - , last_op, ec, sock_type); + , last_op, ec, udp_sock_type); } return ret; } @@ -1670,11 +1675,6 @@ namespace aux { } #endif - socket_type_t const udp_sock_type - = (flags & open_ssl_socket) - ? socket_type_t::utp_ssl - : socket_type_t::udp; - if (m_alerts.should_post()) m_alerts.emplace_alert(device , bind_ep, last_op, ec, udp_sock_type);