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

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

parent 0d2bc9ed
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
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