Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed with a custom close status that indicates so. This allows skipping parts of the close logic that may cause further hanging. Issue: SPR-11450
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.web.socket.handler;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.web.socket.CloseStatus;
|
||||
import org.springframework.web.socket.TextMessage;
|
||||
import org.springframework.web.socket.WebSocketMessage;
|
||||
|
||||
@@ -136,6 +137,7 @@ public class ConcurrentWebSocketSessionDecoratorTests {
|
||||
fail("Expected exception");
|
||||
}
|
||||
catch (SessionLimitExceededException ex) {
|
||||
assertEquals(CloseStatus.SESSION_NOT_RELIABLE, ex.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user