Fix ICE connection fallback (#2144)

* Fix ICE connection fallback

Short connection detection relied on iceFailedTimeout, which previously
had been misinterpreted. Since we've reduced iceFailedTimeout, it is
creating false negatives.

We'll instead use PingTimeout since clients are expected to keep the
signal connection active.

* reduce ping interval to align with total ice failure timeout
This commit is contained in:
David Zhao
2023-10-15 14:36:12 -07:00
committed by GitHub
parent abe74a3f50
commit 65934e6486
6 changed files with 20 additions and 31 deletions
+2 -2
View File
@@ -36,9 +36,9 @@ var (
reconcileInterval = 3 * time.Second
// amount of time to give up if a track or publisher isn't found
// ensuring this is longer than iceFailedTimeout so we are certain the participant won't return
notFoundTimeout = iceFailedTimeout
notFoundTimeout = time.Minute
// amount of time to try otherwise before flagging subscription as failed
subscriptionTimeout = iceFailedTimeout
subscriptionTimeout = iceFailedTimeoutTotal
trackRemoveGracePeriod = time.Second
maxUnsubscribeWait = time.Second
)