Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Fix for issue where exit session intermittently does not return to splash (#5291)

tofarrc70d1606375b
diff --git a/frontend/src/context/ws-client-provider.tsx b/frontend/src/context/ws-client-provider.tsx
index 9160f217d2..89483b234a 100644
--- a/frontend/src/context/ws-client-provider.tsx
+++ b/frontend/src/context/ws-client-provider.tsx
@@ -136,7 +136,7 @@ export function WsClientProvider({
// create a new one
if (
!sio ||
- (tokenRef.current && token !== tokenRef.current) ||
+ (tokenRef.current && token && token !== tokenRef.current) ||
ghToken !== ghTokenRef.current
) {
sio?.disconnect();