osborn 0.9.78 → 0.9.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4795,6 +4795,15 @@ async function main() {
|
|
|
4795
4795
|
}
|
|
4796
4796
|
if (livekitState.status !== 'connected')
|
|
4797
4797
|
return; // already out — no-op
|
|
4798
|
+
// Never abandon a user who is CURRENTLY in the room. Stale/racing
|
|
4799
|
+
// leave-room calls (a previous client's teardown landing after a new
|
|
4800
|
+
// client joined) were kicking the agent out mid-adopt, stranding the new
|
|
4801
|
+
// user on "Connecting..." (observed 2026-07-28). The alone-timer handles
|
|
4802
|
+
// the real departure when they actually leave.
|
|
4803
|
+
if (room.remoteParticipants.size > 0) {
|
|
4804
|
+
console.log(`🛑 /leave-room ignored (${reason}) — ${room.remoteParticipants.size} participant(s) still in room`);
|
|
4805
|
+
return;
|
|
4806
|
+
}
|
|
4798
4807
|
intentionalLeave = true;
|
|
4799
4808
|
console.log(`🚪 Leaving LiveKit room (${reason}) — stops connection-minute burn`);
|
|
4800
4809
|
armIdleExitTimer(`explicit leave (${reason})`);
|