ARTEMIS-814: Fix a bug where context could be null in case a connection was closed before the flow arrived

This commit is contained in:
Ulf Lilleengen 2016-10-21 15:22:46 +02:00 committed by Clebert Suconic
parent b2a5fe19d3
commit 6e5b917cc5
1 changed files with 3 additions and 1 deletions

View File

@ -372,7 +372,9 @@ public class AMQPConnectionContext extends ProtonInitializable {
@Override @Override
public void onFlow(Link link) throws Exception { public void onFlow(Link link) throws Exception {
((ProtonDeliveryHandler) link.getContext()).onFlow(link.getCredit(), link.getDrain()); if (link.getContext() != null) {
((ProtonDeliveryHandler) link.getContext()).onFlow(link.getCredit(), link.getDrain());
}
} }
@Override @Override