Compare commits
No commits in common. "3b19f58e264561517409f7174c98adb1ecc0465e" and "c28b9ac5658436e1b3cf30a240a69bb53d7be962" have entirely different histories.
3b19f58e26
...
c28b9ac565
|
|
@ -77,21 +77,6 @@ export class RealtimeConnection {
|
||||||
this.resetInactivityTimer()
|
this.resetInactivityTimer()
|
||||||
this.clearConnectionTimer()
|
this.clearConnectionTimer()
|
||||||
|
|
||||||
// Ensure the Supabase client has a valid auth session before connecting.
|
|
||||||
// On initial page load, the session may still be loading from cookies.
|
|
||||||
try {
|
|
||||||
const { data: { session } } = await this.supabase.auth.getSession()
|
|
||||||
if (!session && !this.isDestroyed) {
|
|
||||||
// No session yet - wait briefly and retry
|
|
||||||
this.scheduleReconnect()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Session check failed - proceed anyway, channel will handle auth errors
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isDestroyed || this.isPaused) return
|
|
||||||
|
|
||||||
// Set a timeout: if we don't connect within CONNECTION_TIMEOUT_MS, retry
|
// Set a timeout: if we don't connect within CONNECTION_TIMEOUT_MS, retry
|
||||||
this.connectionTimer = setTimeout(() => {
|
this.connectionTimer = setTimeout(() => {
|
||||||
if (this.isDestroyed || this.isPaused) return
|
if (this.isDestroyed || this.isPaused) return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue