Ensure key agreement tasks finish if they ignore interrupts.

This commit is contained in:
akwizgran
2016-12-02 12:25:28 +00:00
parent c2b06536ad
commit cdd234dfe3
2 changed files with 15 additions and 11 deletions

View File

@@ -341,8 +341,10 @@ class DroidtoothPlugin implements DuplexPlugin {
LOG.info("Connected to " + scrubMacAddress(address));
return s;
} catch (IOException e) {
if (LOG.isLoggable(INFO))
LOG.info("Failed to connect to " + scrubMacAddress(address));
if (LOG.isLoggable(INFO)) {
LOG.info("Failed to connect to " + scrubMacAddress(address)
+ ": " + e);
}
tryToClose(s);
return null;
}
@@ -588,9 +590,10 @@ class DroidtoothPlugin implements DuplexPlugin {
finished.countDown();
} else if (action.equals(FOUND)) {
BluetoothDevice d = intent.getParcelableExtra(EXTRA_DEVICE);
if (LOG.isLoggable(INFO))
if (LOG.isLoggable(INFO)) {
LOG.info("Discovered device: " +
scrubMacAddress(d.getAddress()));
}
addresses.add(d.getAddress());
}
}