tls: emit errors happening before handshake's finish#1769
Closed
skenqbx wants to merge 1 commit intonodejs:masterfrom
skenqbx:tls-handshake-error
Closed
tls: emit errors happening before handshake's finish#1769skenqbx wants to merge 1 commit intonodejs:masterfrom skenqbx:tls-handshake-error
skenqbx wants to merge 1 commit intonodejs:masterfrom
skenqbx:tls-handshake-error
Conversation
Contributor
Author
Member
|
May I ask you to elaborate on commit log? Personally, I forgot about what was the reason for this change, and can't remember it now from looking at the commit message ;) The PR has the text, so I guess this is what we actually may want to have in commit log as well. |
Member
|
Otherwise LGTM |
Contributor
Author
|
Commit log updated. Thank you for the prompt review! |
indutny
pushed a commit
that referenced
this pull request
May 22, 2015
This fixes a race condition introduced in 80342f6. `socket.destroy(err)` only emits the passed error when `socket._writableState.errorEmitted === false`, `ssl.onerror` sets `errorEmitted = true` just before calling `socket.destroy()`. See: #1119 See: #1711 PR-URL: #1769 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Member
|
Landed in 2a71f02, thank you! |
andrewdeandrade
pushed a commit
to andrewdeandrade/node
that referenced
this pull request
Jun 3, 2015
This fixes a race condition introduced in 80342f6. `socket.destroy(err)` only emits the passed error when `socket._writableState.errorEmitted === false`, `ssl.onerror` sets `errorEmitted = true` just before calling `socket.destroy()`. See: nodejs/node#1119 See: nodejs/node#1711 PR-URL: nodejs/node#1769 Reviewed-By: Fedor Indutny <fedor@indutny.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a race condition introduced in 80342f6.
socket.destroy(err)only emits the passed error whensocket._writableState.errorEmitted === false,ssl.onerrorsetserrorEmitted = truejust before callingsocket.destroy().See #1119 & #1711
/cc @indutny