Skip to content

Commit

Permalink
handle null proxy configuration when fetching proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Apr 17, 2024
1 parent f245b57 commit a505011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/sparrowwallet/sparrow/AppServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public static Proxy getProxy() {
public static Proxy getProxy(String proxyCircuitId) {
Config config = Config.get();
Proxy proxy = null;
if(config.isUseProxy()) {
if(config.isUseProxy() && config.getProxyServer() != null) {
HostAndPort proxyHostAndPort = HostAndPort.fromString(config.getProxyServer());
InetSocketAddress proxyAddress = new InetSocketAddress(proxyHostAndPort.getHost(), proxyHostAndPort.getPortOrDefault(ProxyTcpOverTlsTransport.DEFAULT_PROXY_PORT));
proxy = new Proxy(Proxy.Type.SOCKS, proxyAddress);
Expand Down

0 comments on commit a505011

Please sign in to comment.