When sending an end session message clear local session store also if sending message fails

This commit is contained in:
AsamK 2020-04-21 20:36:28 +02:00
parent 19b01ff2e9
commit 08749fcee0

View file

@ -732,7 +732,15 @@ public class Manager implements Signal {
SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder() SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder()
.asEndSessionMessage(); .asEndSessionMessage();
sendMessageLegacy(messageBuilder, getSignalServiceAddresses(recipients)); final Collection<SignalServiceAddress> signalServiceAddresses = getSignalServiceAddresses(recipients);
try {
sendMessageLegacy(messageBuilder, signalServiceAddresses);
} catch (Exception e) {
for (SignalServiceAddress address : signalServiceAddresses) {
handleEndSession(address);
}
throw e;
}
} }
@Override @Override