https://issues.apache.org/jira/browse/AMQ-5315

Fix for potential NPE on transport error.