mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Call Thread.currentThread().interrupt() when handling interruption.
This commit is contained in:
@@ -110,7 +110,8 @@ class DroidtoothPlugin implements DuplexPlugin {
|
||||
}
|
||||
});
|
||||
} catch(InterruptedException e) {
|
||||
throw new IOException(e.toString());
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IOException("Interrupted while getting BluetoothAdapter");
|
||||
} catch(ExecutionException e) {
|
||||
throw new IOException(e.toString());
|
||||
}
|
||||
@@ -427,6 +428,7 @@ class DroidtoothPlugin implements DuplexPlugin {
|
||||
addresses = discoverDevices(end - now);
|
||||
} catch(InterruptedException e) {
|
||||
LOG.warning("Interrupted while discovering devices");
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
}
|
||||
// Connect to any device with the right UUID
|
||||
|
||||
@@ -178,6 +178,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
||||
}
|
||||
} catch(InterruptedException e1) {
|
||||
LOG.warning("Interrupted while starting Tor");
|
||||
Thread.currentThread().interrupt();
|
||||
return false;
|
||||
}
|
||||
// Now we should be able to connect to the new process
|
||||
@@ -471,6 +472,8 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
} catch(InterruptedException e) {
|
||||
LOG.warning("Interrupted while creating hidden service");
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Publish the hidden service's onion hostname in transport properties
|
||||
|
||||
Reference in New Issue
Block a user