ARTEMIS-908: Hold connection lock when issuing credits
This commit is contained in:
parent
4dc9751874
commit
f2f3552067
|
@ -433,9 +433,11 @@ public class AMQPSessionCallback implements SessionCallback {
|
|||
store.checkMemory(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (receiver.getRemoteCredit() < threshold) {
|
||||
receiver.flow(credits);
|
||||
connection.flush();
|
||||
synchronized (connection.getLock()) {
|
||||
if (receiver.getRemoteCredit() < threshold) {
|
||||
receiver.flow(credits);
|
||||
connection.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue