Skip to content

Commit e981a6f

Browse files
authored
fix disconnect (#575)
* disconnect is pending endless, due to waitFor connect instead of disconnect * Patch disconnect issue in @livekit/rtc-node Fixes an issue with disconnection in the RTC node.
1 parent 359cefa commit e981a6f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/happy-lamps-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/rtc-node": patch
3+
---
4+
5+
fix disconnect

packages/livekit-rtc/src/room.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class Room extends (EventEmitter as new () => TypedEmitter<RoomCallbacks>
258258
});
259259

260260
await FfiClient.instance.waitFor<DisconnectCallback>((ev: FfiEvent) => {
261-
return ev.message.case == 'connect' && ev.message.value.asyncId == res.asyncId;
261+
return ev.message.case == 'disconnect' && ev.message.value.asyncId == res.asyncId;
262262
});
263263

264264
FfiClient.instance.removeListener(FfiClientEvent.FfiEvent, this.onFfiEvent);

0 commit comments

Comments
 (0)