mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Unsubscribe receive if jsonRpcSender channel is closed
This commit is contained in:
parent
7bf06aef5e
commit
c8cd36bde8
2 changed files with 11 additions and 2 deletions
|
@ -860,7 +860,8 @@ class ManagerImpl implements Manager {
|
|||
logger.debug("Starting receiving messages");
|
||||
context.getReceiveHelper().receiveMessagesContinuously((envelope, e) -> {
|
||||
synchronized (messageHandlers) {
|
||||
Stream.concat(messageHandlers.stream(), weakHandlers.stream()).forEach(h -> {
|
||||
final var handlers = Stream.concat(messageHandlers.stream(), weakHandlers.stream()).toList();
|
||||
handlers.forEach(h -> {
|
||||
try {
|
||||
h.handleMessage(envelope, e);
|
||||
} catch (Throwable ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue