mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-02 14:57:33 +00:00
refactor: update WebSocket connection effect to depend on token changes for reconnection
This commit is contained in:
@@ -46,7 +46,7 @@ const useWebSocketProviderState = (): WebSocketContextType => {
|
||||
wsRef.current.close();
|
||||
}
|
||||
};
|
||||
}, []); // Keep dependency array but add proper cleanup
|
||||
}, [token]); // everytime token changes, we reconnect
|
||||
|
||||
const connect = useCallback(() => {
|
||||
if (unmountedRef.current) return; // Prevent connection if unmounted
|
||||
|
||||
Reference in New Issue
Block a user