Re: [webrtc-pc] Make RTCDtlsTransport.getRemoteCertificates asynchronous? (#2034)

How would a promise be more convenient? It causes a delay and increases uncertainty, and means you can't look at multiple pieces of state information and be assured they are from the same snapshot in time. If you want to know the certificates within onstatechange event then why not return the internal slots here? If you queue another task to get the certificates then in theory you could have disconnected again before having them.

Calling getRemoteCertificates() before we have connected: I think the appropriate thing is to reject the promise, not leave it pending until we may or may not connect depending on other operations.

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

Received on Tuesday, 27 November 2018 09:36:21 UTC