mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 10:11:09 +10:00
fix collab token refresh which leads to collab editor reconnection loop (#933)
This commit is contained in:
@ -18,8 +18,10 @@ export function useCollabToken(): UseQueryResult<ICollabToken, Error> {
|
||||
return useQuery({
|
||||
queryKey: ["collab-token"],
|
||||
queryFn: () => getCollabToken(),
|
||||
staleTime: 24 * 60 * 60 * 1000, //24hrs
|
||||
refetchInterval: 20 * 60 * 60 * 1000, //20hrs
|
||||
staleTime: 20 * 60 * 60 * 1000, //20hrs
|
||||
refetchInterval: 12 * 60 * 60 * 1000, // 12hrs
|
||||
refetchIntervalInBackground: true,
|
||||
refetchOnMount: true,
|
||||
//@ts-ignore
|
||||
retry: (failureCount, error) => {
|
||||
if (isAxiosError(error) && error.response.status === 404) {
|
||||
|
||||
Reference in New Issue
Block a user