This is something I noticed while implementing a rudimentary ICE gathering timeout (see #432). As you can see here, I defer the call to IceCandidateEvent.ready by a configurable timeout. If that timeout is elapses after the iceGatheringState changed to completed, then ready will be called twice.
All other calls to the ready function in RTCSession.js are already conditional on the finished variable, I simply pushed that condition into the function.
This is something I noticed while implementing a rudimentary ICE gathering timeout (see #432). As you can see here, I defer the call to
IceCandidateEvent.ready
by a configurable timeout. If that timeout is elapses after the iceGatheringState changed tocompleted
, thenready
will be called twice.All other calls to the ready function in
RTCSession.js
are already conditional on thefinished
variable, I simply pushed that condition into the function.