Re: [webrtc-pc] Hard to tell if there are state gaps in connectionState algorithm (#2827)

If all the ICE transports and DTLS transports are "closed", then the overall state is "new".   That seems to be pretty straight forward from the rule 'all RTCIceTransports are in the "new" or "closed" state, and all RTCDtlsTransports are in the "new" or "closed" state, or there are no transports'.

That's also clear from the code "ice_new_count + ice_closed_count + dtls_new_count + dtls_closed_count == ice_total_count + dtls_total_count"

A quick reading of the Chrome code indicates that this can never happen in Chrome.  The ICE state used in the algorithm comes from here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/p2p/base/ice_transport_internal.h;l=249;drc=0a3ae731632f6d414e0460ab6bc0bb6e452adfda;bpv=1;bpt=1 and it never goes to "closed".  The DTLS state used in the algorithm comes from here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/p2p/base/dtls_transport.h;l=237;drc=0a3ae731632f6d414e0460ab6bc0bb6e452adfda;bpv=1;bpt=1 and there are 2 places that the DTLS state can go to closed: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/p2p/base/dtls_transport.cc;l=731;drc=0a3ae731632f6d414e0460ab6bc0bb6e452adfda and https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/p2p/base/dtls_transport.cc;l=712;drc=0a3ae731632f6d414e0460ab6bc0bb6e452adfda.   So, the DTLS state could go to "closed", but no the ICE state, so the overall state could not hit this situation.




-- 
GitHub Notification of comment by pthatcher
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2827#issuecomment-1458487264 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 7 March 2023 16:41:37 UTC