Skip to content
Snippets Groups Projects
Commit 24ff4b61 authored by akwizgran's avatar akwizgran
Browse files

Create a fresh server socket for each binding attempt.

parent c5fa3d18
No related branches found
No related tags found
No related merge requests found
......@@ -64,16 +64,11 @@ abstract class TcpPlugin implements DuplexPlugin {
}
private void bind() {
ServerSocket ss;
try {
ss = new ServerSocket();
} catch(IOException e) {
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
return;
}
ServerSocket ss = null;
boolean found = false;
for(SocketAddress addr : getLocalSocketAddresses()) {
try {
ss = new ServerSocket();
ss.bind(addr);
found = true;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment