mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Create a fresh server socket for each binding attempt.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user