From 1de9426df057c73262af7a94031ac85dc364cc2d Mon Sep 17 00:00:00 2001 From: Anatolii Zhmaiev Date: Thu, 29 Sep 2022 13:40:10 +0300 Subject: [PATCH] Set reason for WebSocket CloseStatus.SESSION_NOT_RELIABLE See gh-29220 --- .../main/java/org/springframework/web/socket/CloseStatus.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java b/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java index 77d7465982..bafbdf50ca 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java @@ -145,7 +145,8 @@ public final class CloseStatus implements Serializable { * client that may be done during normal shutdown. * @since 4.0.3 */ - public static final CloseStatus SESSION_NOT_RELIABLE = new CloseStatus(4500); + public static final CloseStatus SESSION_NOT_RELIABLE = new CloseStatus(4500) + .withReason("Failed to send message within the configured send limit"); private final int code;