mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Use improved shutdown for daemon command
This commit is contained in:
parent
b7fedff511
commit
1058e33f12
3 changed files with 64 additions and 18 deletions
|
@ -62,7 +62,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static org.asamk.signal.dbus.DbusUtils.makeValidObjectPathElement;
|
||||
|
||||
public class DbusSignalImpl implements Signal {
|
||||
public class DbusSignalImpl implements Signal, AutoCloseable {
|
||||
|
||||
private final Manager m;
|
||||
private final DBusConnection connection;
|
||||
|
@ -108,6 +108,7 @@ public class DbusSignalImpl implements Signal {
|
|||
updateIdentities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (dbusMessageHandler != null) {
|
||||
m.removeReceiveHandler(dbusMessageHandler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue