ACTIVEMQ6-55: prevent NPE when closing a link that didnt get as far as having a context added
This commit is contained in:
parent
d47fba4251
commit
983effca9d
|
@ -255,7 +255,11 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl
|
|||
public void onRemoteClose(Link link) throws Exception
|
||||
{
|
||||
link.close();
|
||||
((ProtonDeliveryHandler) link.getContext()).close();
|
||||
ProtonDeliveryHandler linkContext = (ProtonDeliveryHandler) link.getContext();
|
||||
if (linkContext != null)
|
||||
{
|
||||
linkContext.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue