From 8ae5ef1f513d4b3b24c291991215d04f96016453 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 13 Sep 2021 09:55:15 +0200 Subject: [PATCH] [socks5] Ensure that the local SOCKS5 proxy is running (if enabled) In 9352225f444b ("Rework SOCKS5 unit tests so that they can be run in parallel") the call to getSocks5Proxy() in Socks5BytestreamManager.getLocalStreamHost() was removed. Since getSocks5Proxy() does also start the local proxy, if it is not already running, this caused Smack to no longer automatically start the local proxy. This commit re-adds the call to getSocks5Proxy() and fixes SMACK-912. --- .../smackx/bytestreams/socks5/Socks5BytestreamManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java index f257efa6e..46b438d72 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java @@ -658,6 +658,9 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream * is not running */ public List getLocalStreamHost() { + // Ensure that the local SOCKS5 proxy is running (if enabled). + Socks5Proxy.getSocks5Proxy(); + List streamHosts = new ArrayList<>(); XMPPConnection connection = connection();