mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Add more informative thread names
This commit is contained in:
parent
2e74acaabe
commit
380c892e24
4 changed files with 21 additions and 6 deletions
|
@ -96,14 +96,16 @@ public class DbusSignalControlImpl implements org.asamk.SignalControl {
|
|||
public String link(final String newDeviceName) throws Error.Failure {
|
||||
try {
|
||||
final URI deviceLinkUri = c.getNewProvisioningDeviceLinkUri();
|
||||
new Thread(() -> {
|
||||
final var thread = new Thread(() -> {
|
||||
final ProvisioningManager provisioningManager = c.getProvisioningManagerFor(deviceLinkUri);
|
||||
try {
|
||||
provisioningManager.finishDeviceLink(newDeviceName);
|
||||
} catch (IOException | TimeoutException | UserAlreadyExists e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
});
|
||||
thread.setName("dbus-link");
|
||||
thread.start();
|
||||
return deviceLinkUri.toString();
|
||||
} catch (TimeoutException | IOException e) {
|
||||
throw new SignalControl.Error.Failure(e.getClass().getSimpleName() + " " + e.getMessage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue