mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
Use signalAll in SynchronizationPoint
to prevent a thread from not being notified about a change of the state of the SynchronizationPoint. If two threads are waiting for a change, which could happen e.g. because of a connectivity change and one thread does instantShutdown() while the other handles connectionClosedOnError(), then only one thread, usually the one handling connectionClosedOnError(), would be notified and resumed. Fixes SMACK-652.
This commit is contained in:
parent
57fa631480
commit
83aa6838d9
1 changed files with 2 additions and 2 deletions
|
@ -153,7 +153,7 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
connectionLock.lock();
|
||||
try {
|
||||
state = State.Success;
|
||||
condition.signal();
|
||||
condition.signalAll();
|
||||
}
|
||||
finally {
|
||||
connectionLock.unlock();
|
||||
|
@ -174,7 +174,7 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
try {
|
||||
state = State.Failure;
|
||||
this.failureException = failureException;
|
||||
condition.signal();
|
||||
condition.signalAll();
|
||||
}
|
||||
finally {
|
||||
connectionLock.unlock();
|
||||
|
|
Loading…
Reference in a new issue