mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Fix removeReceiveHandler to not incorrectly reset the receiveThread
This commit is contained in:
parent
5dd602614c
commit
e495afcff5
1 changed files with 2 additions and 2 deletions
|
@ -956,12 +956,12 @@ public class ManagerImpl implements Manager {
|
|||
public void removeReceiveHandler(final ReceiveMessageHandler handler) {
|
||||
final Thread thread;
|
||||
synchronized (messageHandlers) {
|
||||
thread = receiveThread;
|
||||
receiveThread = null;
|
||||
messageHandlers.remove(handler);
|
||||
if (!messageHandlers.isEmpty() || isReceivingSynchronous) {
|
||||
return;
|
||||
}
|
||||
thread = receiveThread;
|
||||
receiveThread = null;
|
||||
}
|
||||
|
||||
stopReceiveThread(thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue