X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/b7fedff5110c55625f2391a5aab607a2248bf104..1058e33f1208e1ca284d3fd4760380d68093741f:/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java index a5f28c67..e6ec70d9 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java @@ -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);