-
-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
Summary
When using libjuice on macOS, connectivity is lost shortly after establishing a connection and never recovers. This issue of losing connection shortly does not occur on Linux or Windows.
Details
The issue occurs when the connection temporarily drops and the following block in agent.c is executed:
if (nominated_pair && nominated_pair->state == ICE_CANDIDATE_PAIR_STATE_FAILED) {
JLOG_WARN("Lost connectivity");
agent_change_state(agent, JUICE_STATE_FAILED);
atomic_store(&agent->selected_entry, NULL); // disallow sending
return 0;
}This sets the internal state to JUICE_STATE_FAILED and clears the selected_entry, which disables sending.
However, if the ICE connection is shortly re-established and the agent transition back to JUICE_STATE_COMPLETED — but the selected_entry is never restored.
As a result:
- The connection remains unusable for sending even though it reports a completed state.
- No packets can be sent through the agent anymore.
- This does not happen on Linux or Windows, only on macOS.
- The issue occurs even if no traffic is being sent — the connection still fails quickly.
Expected Behavior
After ICE reconnects and the state returns to JUICE_STATE_COMPLETED, the agent should restore a valid selected_entry so that data can be sent again?
Platform
- OS: macOS
- libjuice version: 1.6.0
- Steps to reproduce:
- Run a libjuice-based agent on macOS.
- Establish connection.
- Wait for a brief period (connection drops).
- Connection transitions to
FAILEDand then back toCOMPLETED. - Sending data fails due to
selected_entry == NULL.
Metadata
Metadata
Assignees
Labels
No labels