Skip to content

Commit

Permalink
fix(core): fix auth session not revalidating as expected (#8886)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Nov 21, 2024
1 parent a4c749b commit 76eabf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/frontend/core/src/modules/cloud/entities/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import {
backoffRetry,
effect,
Entity,
exhaustMapWithTrailing,
fromPromise,
LiveData,
onComplete,
onStart,
} from '@toeverything/infra';
import { isEqual } from 'lodash-es';
import { EMPTY, exhaustMap, mergeMap } from 'rxjs';
import { EMPTY, mergeMap } from 'rxjs';

import { validateAndReduceImage } from '../../../utils/reduce-image';
import type { AccountProfile, AuthStore } from '../stores/auth';
Expand Down Expand Up @@ -66,7 +67,7 @@ export class AuthSession extends Entity {
}

revalidate = effect(
exhaustMap(() =>
exhaustMapWithTrailing(() =>
fromPromise(this.getSession()).pipe(
backoffRetry({
count: Infinity,
Expand Down

0 comments on commit 76eabf6

Please sign in to comment.