diff --git a/chatty-be/src/main/java/com/chatty/chatty/config/WebSocketConfig.java b/chatty-be/src/main/java/com/chatty/chatty/config/WebSocketConfig.java index bf80066c..858dc8e5 100644 --- a/chatty-be/src/main/java/com/chatty/chatty/config/WebSocketConfig.java +++ b/chatty-be/src/main/java/com/chatty/chatty/config/WebSocketConfig.java @@ -28,7 +28,9 @@ public void registerStompEndpoints(StompEndpointRegistry registry) { @Override public void configureMessageBroker(MessageBrokerRegistry registry) { - registry.enableSimpleBroker("/sub", "/queue", "/user"); + registry.enableSimpleBroker("/sub", "/queue", "/user") + .setHeartbeatValue(new long[]{4000, 4000}) + ; registry.setApplicationDestinationPrefixes("/pub"); }