Skip to content

Commit

Permalink
Allow backwards-compatible createSocket calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Clayton Walker authored and ok2c committed Jan 16, 2024
1 parent fbd6954 commit bece935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public PlainConnectionSocketFactory() {

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

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 proxy != null ? new Socket(proxy) : new Socket();
return proxy != null ? new Socket(proxy) : createSocket(context);
}

@Override
Expand Down

0 comments on commit bece935

Please sign in to comment.