ARTEMIS-1732 Fixing AMQPSenderTest

This commit is contained in:
Clebert Suconic 2018-08-01 22:14:15 -04:00
parent a7e4ce490b
commit e290071ced
1 changed files with 3 additions and 1 deletions

View File

@ -581,7 +581,9 @@ public class AMQPSessionCallback implements SessionCallback {
Runnable creditRunnable = () -> {
connection.lock();
try {
receiver.flow(credits);
if (receiver.getRemoteCredit() <= threshold) {
receiver.flow(credits);
}
} finally {
connection.unlock();
}