Closing the socket on shutdown sometimes causes a crash; don't close it.

This commit is contained in:
akwizgran
2013-02-19 19:18:53 +00:00
parent 0d2bc9ed7b
commit e99d42e0ac

View File

@@ -63,7 +63,6 @@ class DroidtoothPlugin implements DuplexPlugin {
private final long maxLatency, pollingInterval;
private volatile boolean running = false;
private volatile BluetoothServerSocket socket = null;
// Non-null if running has ever been true
private volatile BluetoothAdapter adapter = null;
@@ -141,7 +140,6 @@ class DroidtoothPlugin implements DuplexPlugin {
tryToClose(ss);
return;
}
socket = ss;
acceptContactConnections(ss);
}
@@ -196,7 +194,6 @@ class DroidtoothPlugin implements DuplexPlugin {
public void stop() {
running = false;
if(socket != null) tryToClose(socket);
}
public boolean shouldPoll() {