mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
Check whether the socket has been set to null due to a failed
re-binding.
This commit is contained in:
@@ -88,6 +88,7 @@ implements StreamTransportPlugin {
|
|||||||
Socket s;
|
Socket s;
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
if(!started) return;
|
if(!started) return;
|
||||||
|
if(socket == null) return;
|
||||||
ss = socket;
|
ss = socket;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -114,7 +115,10 @@ implements StreamTransportPlugin {
|
|||||||
|
|
||||||
public synchronized void stop() throws IOException {
|
public synchronized void stop() throws IOException {
|
||||||
super.stop();
|
super.stop();
|
||||||
if(socket != null) socket.close();
|
if(socket != null) {
|
||||||
|
socket.close();
|
||||||
|
socket = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setLocalProperties(Map<String, String> properties)
|
public synchronized void setLocalProperties(Map<String, String> properties)
|
||||||
@@ -129,6 +133,7 @@ implements StreamTransportPlugin {
|
|||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// FIXME: Logging
|
// FIXME: Logging
|
||||||
}
|
}
|
||||||
|
socket = null;
|
||||||
executor.execute(createBinder());
|
executor.execute(createBinder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user