-
-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm facing a crash within RealtimeV2 while just leaving our app open. The app uses realtime on each screen, and when opening each screen we connect the RealtimeV2 client if needed like so:
let client = UserController.shared.supabaseClient.realtimeV2
if client.status == .disconnected {
await client.connect()
}
// subscribe to channel etcWe never call disconnect(). However after leaving the app open, after anywhere between 5 minutes to hours the RealtimeV2 library encounters the crash Fatal error: attempt to await next() on more than one task
Seems this line for await connectionStatus in ws.connect() needs to be used very carefully. I am struggling to reproduce manually but maybe something to do with only setting status = .connecting after the Task.sleep leading to this potentially getting called twice if you were to call connect(reconnect: true) twice somehow?
diederich
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

