Fixes Invalid Proxy exception when using a SSL client without Proxy

This commit is contained in:
Cédric Tabin 2023-11-23 13:20:03 +01:00 committed by Oleg Kalnichevski
parent 83d603c9d8
commit 6d60624cd3

View File

@ -206,7 +206,7 @@ public Socket createSocket(final HttpContext context) throws IOException {
@Override
public Socket createSocket(final Proxy proxy, final HttpContext context) throws IOException {
return new Socket(proxy);
return proxy != null ? new Socket(proxy) : new Socket();
}
@Override