Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description of DTLS transport error handling. #2064

Merged
merged 2 commits into from
Feb 1, 2019

Conversation

alvestrand
Copy link
Contributor

@alvestrand alvestrand commented Jan 17, 2019

Fixes #2044


Preview | Diff

webrtc.html Outdated
a certificate validation failure, or a fatal alert (see RFC 5246
section 7.2), the user agent MUST queue a task that runs the following
steps:
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Here and elsewhere - There shouldn't be an extra indent here and </p> should be on the line above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tidy....

webrtc.html Outdated
<code><a data-lt="RTCDtlsTransport error">error</a></code>
using the <a>RTCErrorEvent</a> interface with its errorDetail
attribute set to either "dtls-failure" or "fingerprint-failure",
as appropriate, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unnecessary newline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M-x fill-paragraph

webrtc.html Show resolved Hide resolved
webrtc.html Outdated
</p>
</li>
<li>
<p><a>Fire an event</a> named <code><a data-lt="RTCDtlsTransport state change">statechange</a></code>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the state is not already "failed".....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting - the most straightforward code path is to check if state is "failed" before setting the state, and aborting these steps if it's already failed - which will mean that you're guaranteed to never get more than one error notification for a DTLSTransport. (the handler for the error event should see state as "failed", not the state as it was prior to the error).

webrtc.html Outdated Show resolved Hide resolved
Copy link
Contributor Author

@alvestrand alvestrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I addressed them all (except formatting, which html tidy should do).

webrtc.html Outdated
a certificate validation failure, or a fatal alert (see RFC 5246
section 7.2), the user agent MUST queue a task that runs the following
steps:
</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tidy....

webrtc.html Outdated Show resolved Hide resolved
webrtc.html Outdated
<code><a data-lt="RTCDtlsTransport error">error</a></code>
using the <a>RTCErrorEvent</a> interface with its errorDetail
attribute set to either "dtls-failure" or "fingerprint-failure",
as appropriate, and
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M-x fill-paragraph

webrtc.html Outdated
</p>
</li>
<li>
<p><a>Fire an event</a> named <code><a data-lt="RTCDtlsTransport state change">statechange</a></code>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting - the most straightforward code path is to check if state is "failed" before setting the state, and aborting these steps if it's already failed - which will mean that you're guaranteed to never get more than one error notification for a DTLSTransport. (the handler for the error event should see state as "failed", not the state as it was prior to the error).

webrtc.html Show resolved Hide resolved
@alvestrand alvestrand merged commit 288752e into master Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants