fix: read-after-write issues (#215)

* fix: read-after-write issues

* fix: coderabbit comments

* fix: clear cache on invite

* fix: use primary after a read
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-31 09:56:07 +01:00
committed by GitHub
parent abacf66155
commit f454449365
19 changed files with 470 additions and 167 deletions

View File

@@ -24,9 +24,11 @@ export function useSessionExtension() {
1000 * 60 * 5,
);
extendSessionFn();
// Delay initial call a bit to prioritize other requests
const timer = setTimeout(() => extendSessionFn(), 5000);
return () => {
clearTimeout(timer);
if (intervalRef.current) {
clearInterval(intervalRef.current);
}