[socks5] Ensure that the local SOCKS5 proxy is running (if enabled)

In 9352225f44 ("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.
This commit is contained in:
Florian Schmaus 2021-09-13 09:55:15 +02:00
parent 1564b98d60
commit 8ae5ef1f51
1 changed files with 3 additions and 0 deletions

View File

@ -658,6 +658,9 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
* is not running
*/
public List<StreamHost> getLocalStreamHost() {
// Ensure that the local SOCKS5 proxy is running (if enabled).
Socks5Proxy.getSocks5Proxy();
List<StreamHost> streamHosts = new ArrayList<>();
XMPPConnection connection = connection();