diff --git a/src/main/java/org/asamk/signal/manager/Manager.java b/src/main/java/org/asamk/signal/manager/Manager.java index cec04431..b6964917 100644 --- a/src/main/java/org/asamk/signal/manager/Manager.java +++ b/src/main/java/org/asamk/signal/manager/Manager.java @@ -732,7 +732,15 @@ public class Manager implements Signal { SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder() .asEndSessionMessage(); - sendMessageLegacy(messageBuilder, getSignalServiceAddresses(recipients)); + final Collection signalServiceAddresses = getSignalServiceAddresses(recipients); + try { + sendMessageLegacy(messageBuilder, signalServiceAddresses); + } catch (Exception e) { + for (SignalServiceAddress address : signalServiceAddresses) { + handleEndSession(address); + } + throw e; + } } @Override