Merge branch '1899-catch-npe-from-bluetooth-socket' into 'master'

Catch NPE from BluetoothSocket#connect()

Closes #1899

See merge request briar/briar!1407
This commit is contained in:
Torsten Grote
2021-03-11 18:09:59 +00:00

View File

@@ -175,6 +175,11 @@ class AndroidBluetoothPlugin
} catch (IOException e) {
IoUtils.tryToClose(s, LOG, WARNING);
throw e;
} catch (NullPointerException e) {
// BluetoothSocket#connect() may throw an NPE under unknown
// circumstances
IoUtils.tryToClose(s, LOG, WARNING);
throw new IOException(e);
}
}