diff --git a/lib/drift/client.ts b/lib/drift/client.ts index cd4757c..7eeb56a 100644 --- a/lib/drift/client.ts +++ b/lib/drift/client.ts @@ -31,7 +31,7 @@ export class DriftService { private user: User | null = null private isInitialized: boolean = false private reconnectTimer: NodeJS.Timeout | null = null - private reconnectIntervalMs: number = 4 * 60 * 60 * 1000 // 4 hours (prevent memory leak) + private reconnectIntervalMs: number = 2 * 60 * 60 * 1000 // 2 hours (aggressive - Drift SDK memory leak is severe) constructor(private config: DriftConfig) { // Helius connection for Drift SDK initialization (handles burst subscriptions well) @@ -200,7 +200,7 @@ export class DriftService { clearTimeout(this.reconnectTimer) } - // Schedule reconnection every 4 hours + // Schedule reconnection every 2 hours this.reconnectTimer = setTimeout(async () => { try { console.log('🔄 Scheduled reconnection: Clearing WebSocket subscriptions to prevent memory leak...')