Skip to content

fix(plugin-meetings): prevent LLM connection from being permanently killed#3

Closed
mickelr wants to merge 1 commit into
nextfrom
fix/llm-lost
Closed

fix(plugin-meetings): prevent LLM connection from being permanently killed#3
mickelr wants to merge 1 commit into
nextfrom
fix/llm-lost

Conversation

@mickelr
Copy link
Copy Markdown
Owner

@mickelr mickelr commented Apr 20, 2026

Problem

updateLLMConnection() disconnects the shared LLM singleton (code 3050, permanent) before validating whether reconnection is feasible. This causes permanent LLM loss in two scenarios:

  1. Unjoined meeting triggers disconnect - An incoming CALL creates a new meeting object that calls updateLLMConnection(). Since isJoined() is false on the new meeting, it disconnects the webinar LLM but never reconnects.

  2. datachannelUrl cleared by locus.difference - A locus delta clears datachannelUrl. The method disconnects the LLM, then registerAndConnect() silently bails out because datachannelUrl is null.

Fix

Add a guard before cleanupLLMConneciton() that validates reconnection is feasible (isJoined, url, and dataChannelUrl must all be truthy). If reconnection is not possible, the existing LLM connection is preserved.

Testing

  • Updated existing test for the new behavior
  • Added 3 new unit tests covering both failure scenarios
  • All 3273 unit tests pass

@mickelr mickelr closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant