From 788e41c3bb0acadd484ff5f6405a5afe598c47a0 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 5 Aug 2015 22:22:57 -0400 Subject: [PATCH] merged udp socket fallback fix from RC_1_0 --- ChangeLog | 1 + src/udp_socket.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 16f1139f7..b16a1d206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -73,6 +73,7 @@ * added support for hashing pieces in multiple threads + * fixed falling back to sending UDP packets direct when socks proxy fails * fixed total_wanted bug (when setting file priorities in add_torrent_params) 1.0.6 release diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index 4c8ae782d..ff97b2d89 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -932,6 +932,13 @@ void udp_socket::on_connected(error_code const& e) if (e) { + // we failed to connect to the proxy, if we don't have force_proxy set, + // drain the queue over the UDP socket + if (!m_force_proxy) + { + drain_queue(); + } + call_handler(e, udp::endpoint(), 0, 0); return; }