File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
dinky-admin/src/main/java/org/dinky/ws Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ public enum EventType {
94
94
private static final Map <Session , RequestDTO > TOPICS = new ConcurrentHashMap <>();
95
95
96
96
@ OnOpen
97
- public void onOpen (Session session ) {}
97
+ public void onOpen (Session session ) {
98
+ session .setMaxIdleTimeout (30000 );
99
+ }
98
100
99
101
@ OnClose
100
102
public void onClose (Session session ) {
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export default () => {
59
59
const ws = useRef < WebSocket > ( ) ;
60
60
61
61
const reconnect = ( ) => {
62
- if ( ws . current && ws . current . readyState === WebSocket . CLOSED ) {
62
+ if ( ws . current && ws . current . readyState === WebSocket . OPEN ) {
63
63
ws . current . close ( ) ;
64
64
}
65
65
ws . current = new WebSocket ( wsUrl ) ;
You can’t perform that action at this time.
0 commit comments