Skip to content

Commit d22ca84

Browse files
authored
Allow setting ice_gathering_timeout option (#330)
This change allows setting they UA ice gathering timeout value. When the ice_gathering_timeout is set to zero, the timeout is disabled.
1 parent 7121e8c commit d22ca84

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/src/config.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ class Checks {
240240
if (dtmf_mode == null) return;
241241
dst!.dtmf_mode = dtmf_mode;
242242
},
243+
'ice_gathering_timeout': (Settings src, Settings? dst) {
244+
dst!.ice_gathering_timeout = src.ice_gathering_timeout;
245+
}
243246
};
244247
}
245248

lib/src/rtc_session.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,9 @@ class RTCSession extends EventManager implements Owner {
16731673
* Because trickle ICE is not defined in the sip protocol, the delay of
16741674
* initiating a call to answer the call waiting will be unacceptable.
16751675
*/
1676-
setTimeout(() => ready(), ua.configuration.ice_gathering_timeout);
1676+
if (ua.configuration.ice_gathering_timeout != 0) {
1677+
setTimeout(() => ready(), ua.configuration.ice_gathering_timeout);
1678+
}
16771679
}
16781680
}
16791681
};

0 commit comments

Comments
 (0)