mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 23:48:09 -05:00
add 6s timeout (#645)
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
This commit is contained in:
committed by
GitHub
parent
4a26b061a4
commit
24e19a83a5
@@ -87,8 +87,10 @@ export function WorkspacePermissionsProvider({ children }: WorkspacePermissionsP
|
||||
}
|
||||
// If we were previously connected and this is a reconnection, stay offline (user must refresh)
|
||||
} else if (hasBeenConnected) {
|
||||
// Only enter offline mode if we were previously connected and now disconnected
|
||||
setIsOfflineMode(true)
|
||||
const timeoutId = setTimeout(() => {
|
||||
setIsOfflineMode(true)
|
||||
}, 6000)
|
||||
return () => clearTimeout(timeoutId)
|
||||
}
|
||||
// If not connected and never been connected, stay in initial state (not offline mode)
|
||||
}, [isConnected, hasBeenConnected])
|
||||
|
||||
Reference in New Issue
Block a user