mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Closing the socket on shutdown sometimes causes a crash; don't close it.
This commit is contained in:
@@ -63,7 +63,6 @@ class DroidtoothPlugin implements DuplexPlugin {
|
|||||||
private final long maxLatency, pollingInterval;
|
private final long maxLatency, pollingInterval;
|
||||||
|
|
||||||
private volatile boolean running = false;
|
private volatile boolean running = false;
|
||||||
private volatile BluetoothServerSocket socket = null;
|
|
||||||
|
|
||||||
// Non-null if running has ever been true
|
// Non-null if running has ever been true
|
||||||
private volatile BluetoothAdapter adapter = null;
|
private volatile BluetoothAdapter adapter = null;
|
||||||
@@ -141,7 +140,6 @@ class DroidtoothPlugin implements DuplexPlugin {
|
|||||||
tryToClose(ss);
|
tryToClose(ss);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
socket = ss;
|
|
||||||
acceptContactConnections(ss);
|
acceptContactConnections(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +194,6 @@ class DroidtoothPlugin implements DuplexPlugin {
|
|||||||
|
|
||||||
public void stop() {
|
public void stop() {
|
||||||
running = false;
|
running = false;
|
||||||
if(socket != null) tryToClose(socket);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldPoll() {
|
public boolean shouldPoll() {
|
||||||
|
|||||||
Reference in New Issue
Block a user