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() {
|
store.checkMemory(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (receiver.getRemoteCredit() < threshold) {
|
synchronized (connection.getLock()) {
|
||||||
receiver.flow(credits);
|
if (receiver.getRemoteCredit() < threshold) {
|
||||||
connection.flush();
|
receiver.flow(credits);
|
||||||
|
connection.flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue