-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
livekit: wait for disconnect before callback #370
base: main
Are you sure you want to change the base?
Conversation
fixed on the node-sdks side. |
let (tx, rx) = oneshot::channel(); | ||
session.close().await; | ||
let _ = close_tx.send(()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let (tx, rx) = oneshot::channel(); | |
session.close().await; | |
let _ = close_tx.send(()); | |
session.close().await; |
let _ = self.engine_tx.send(EngineEvent::Disconnected { reason, tx }); | ||
let _ = rx.await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let _ = self.engine_tx.send(EngineEvent::Disconnected { reason, tx }); | |
let _ = rx.await; | |
let _ = self.engine_tx.send(EngineEvent::Disconnected { reason }); |
I think just removing close_tx and waiting for engine_tx to ends should do the work |
i don't think this works, |
should fix a race condition where in node-sdks
await room.disconnect()
doesn't wait for the room status update to change.draft because it doesn't work reliably yet: patched node-sdks still fails approximately one in fifty times.
node-sdks diff