This closes #947

This commit is contained in:
Justin Bertram 2017-01-04 10:59:33 -06:00
commit 973265b1ef
1 changed files with 5 additions and 3 deletions

View File

@ -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();
}
}
}
});