Reset connection before delegating to handler
Resetting the connection first before invoking a failure callback on the application handler ensures that any checks to isConnected will return false. Issue: SPR-14721
This commit is contained in:
parent
d8a771356c
commit
99c7917124
|
@ -480,8 +480,8 @@ public class DefaultStompSession implements ConnectionHandlingStompSession {
|
||||||
logger.debug("Connection closed session id=" + this.sessionId);
|
logger.debug("Connection closed session id=" + this.sessionId);
|
||||||
}
|
}
|
||||||
if (!this.closing) {
|
if (!this.closing) {
|
||||||
handleFailure(new ConnectionLostException("Connection closed"));
|
|
||||||
resetConnection();
|
resetConnection();
|
||||||
|
handleFailure(new ConnectionLostException("Connection closed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,8 +671,8 @@ public class DefaultStompSession implements ConnectionHandlingStompSession {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(error);
|
logger.debug(error);
|
||||||
}
|
}
|
||||||
handleFailure(new IllegalStateException(error));
|
|
||||||
resetConnection();
|
resetConnection();
|
||||||
|
handleFailure(new IllegalStateException(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue