diff options
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp index 3221790..a1ef8f6 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.cpp @@ -126,34 +126,36 @@ void SOCKS5BytestreamProxiesManager::handleProxiesFound(std::vector<S5BProxyRequ resolveRequest->run(); } } } proxyFinder_->stop(); proxyFinder_.reset(); + if (proxyHosts.empty()) { + onDiscoveredProxiesChanged(); + } } void SOCKS5BytestreamProxiesManager::handleNameLookupResult(const std::vector<HostAddress>& addresses, boost::optional<DomainNameResolveError> error, S5BProxyRequest::ref proxy) { if (error) { onDiscoveredProxiesChanged(); } else { if (addresses.empty()) { SWIFT_LOG(warning) << "S5B proxy hostname does not resolve." << std::endl; - onDiscoveredProxiesChanged(); } else { // generate proxy per returned address foreach (const HostAddress& address, addresses) { S5BProxyRequest::StreamHost streamHost = proxy->getStreamHost().get(); S5BProxyRequest::ref proxyForAddress = boost::make_shared<S5BProxyRequest>(*proxy); streamHost.host = address.toString(); proxyForAddress->setStreamHost(streamHost); addS5BProxy(proxyForAddress); } - onDiscoveredProxiesChanged(); } + onDiscoveredProxiesChanged(); } } void SOCKS5BytestreamProxiesManager::queryForProxies() { proxyFinder_ = boost::make_shared<SOCKS5BytestreamProxyFinder>(serviceRoot_, iqRouter_); |