Use ConnectionLostException after heartbeat failures
ConnectionLostException was applies only after the WebSocket library notified us of a session close. However, read inactivity and heartbeat send failures are also cases of the connection being lost rather than closed intentionally. This commit also ensures resetConnection is called after a heartbeat write failure, consistent with other places where a transport error is handled that implies the connection is lost. See gh-32195
This commit is contained in:
@@ -221,7 +221,7 @@ public class DefaultStompSessionTests {
|
||||
|
||||
reset(this.sessionHandler);
|
||||
readTask.run();
|
||||
verify(this.sessionHandler).handleTransportError(same(this.session), any(IllegalStateException.class));
|
||||
verify(this.sessionHandler).handleTransportError(same(this.session), any(ConnectionLostException.class));
|
||||
verifyNoMoreInteractions(this.sessionHandler);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user