mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-30 19:14:20 +01:00
Unsubscribe receive if jsonRpcSender channel is closed
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user