We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you use a custom socketFactory this code can be buggy:
if (!socket.isBound()) { InetSocketAddress addr = new InetSocketAddress(dnsResolver.resolve(uri), this.getPort()); socket.connect(addr, connectTimeout); }
Indeed socket might already be bound by socketFactory and isBound() will return true. A better version could be
if (!socket.isConnected()) { InetSocketAddress addr = new InetSocketAddress(dnsResolver.resolve(uri), this.getPort()); socket.connect(addr, connectTimeout); }
This issue is linked to the solution I mentionned in issue #814
The text was updated successfully, but these errors were encountered:
Hello, Could you provide additional steps to repeat? Can this issue be tested somehow?
And if you, would you be so kind an open a pull request?
Thx a lot Marcel
Sorry, something went wrong.
Ok I will open a pull request.
Olivier
Use socket isConnected() method rather than isBound() before connect …
39ff448
…to server. Fixes TooTallNate#962
cc030e3
Successfully merging a pull request may close this issue.
When you use a custom socketFactory this code can be buggy:
Indeed socket might already be bound by socketFactory and isBound() will return true. A better version could be
This issue is linked to the solution I mentionned in issue #814
The text was updated successfully, but these errors were encountered: