ARTEMIS-1389 Add non-null check to ServerSessionImpl.doClose()
An Openwire connection creates an internal session used to track transaction status, it doesn't have a session callback. When the connection is closed, the core session should check if callback is null to avoid NPE.
This commit is contained in:
parent
3497ae81f2
commit
cd551bfba0
|
@ -348,7 +348,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
|||
}
|
||||
|
||||
protected void doClose(final boolean failed) throws Exception {
|
||||
callback.close(failed);
|
||||
if (callback != null) {
|
||||
callback.close(failed);
|
||||
}
|
||||
synchronized (this) {
|
||||
if (!closed) {
|
||||
server.callBrokerPlugins(server.hasBrokerPlugins() ? plugin -> plugin.beforeCloseSession(this, failed) : null);
|
||||
|
|
Loading…
Reference in New Issue