ARTEMIS-908: Ensure that connection lock is held when flushing

This commit is contained in:
Ulf Lilleengen 2017-02-15 14:09:27 +01:00
parent 92290ba00f
commit 5f6a390b60
1 changed files with 4 additions and 2 deletions

View File

@ -443,8 +443,10 @@ public class AMQPSessionCallback implements SessionCallback {
final Receiver receiver) {
try {
if (address == null) {
receiver.flow(credits);
connection.flush();
synchronized (connection.getLock()) {
receiver.flow(credits);
connection.flush();
}
return;
}
final PagingStore store = manager.getServer().getPagingManager().getPageStore(new SimpleString(address));