Re: [webrtc-pc] Cleanup connection states. (#2036)

> These are the effective changes:
> 
> - In RTCPeerConnectionState we now prefer "disconnected" over "connecting", that is to say, we no longer do the 'and none of them are in the "connecting" or "checking"' thing. This was done to ensure that the two connection states behave similarly, unlike now.

So you would go like this?
new -> connecting -> connected/completed -> disconnected -> connected/completed
Rather than this?
new -> connecting -> connected/completed -> connecting -> connected/completed

I think "disconnected" sounds like something you are when you're not connecting, connected, closed, failed or new. As in "no error occurred and I haven't given up yet by closing". But as soon as I attempt to connect again I would expect "connecting". Would it make more sense to always be "connecting" if you are not already connected or have "disconnected" be an intermediate state like so?

new -> connecting -> connected/completed -> disconnected -> connecting -> connected/completed

> - Neither of the "new" states allow transports to be "connected" or "completed" any more. The states that would have previously ended up covered here are now "connected" instead.

Would "connecting" and "completed" also apply here instead of "new"?

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

Received on Thursday, 6 December 2018 14:28:46 UTC