Sitelet https://github.com/nodejs/node/pull/8889
Skip to content

tls: handle error events with _tlsError - #8889

Closed
indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:feature/improve-tls-error-handling
Closed

indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:feature/improve-tls-error-handling

Conversation

@indutny

@indutny indutny commented Oct 1, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

tls

Description of change

Previously TLSSocket#_emitTLSError was used as an error event
handler. However that function can emit error event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.

cc @nodejs/crypto

Previously `TLSSocket#_emitTLSError` was used as an `error` event
handler. However that function can emit `error` event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.
@nodejs-github-bot nodejs-github-bot added the tls Issues and PRs related to the tls subsystem. label Oct 1, 2016
@indutny

indutny commented Oct 1, 2016

Copy link
Copy Markdown
Member Author

@indutny

indutny commented Oct 3, 2016

Copy link
Copy Markdown
Member Author

Landed in d33c4bf, thank you!

@indutny indutny closed this Oct 3, 2016
@indutny
indutny deleted the feature/improve-tls-error-handling branch October 3, 2016 23:45
indutny added a commit that referenced this pull request Oct 3, 2016
Previously `TLSSocket#_emitTLSError` was used as an `error` event
handler. However that function can emit `error` event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.

PR-URL: #8889
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell pushed a commit that referenced this pull request Oct 6, 2016
Previously `TLSSocket#_emitTLSError` was used as an `error` event
handler. However that function can emit `error` event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.

PR-URL: #8889
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

@indutny lts?

@indutny

indutny commented Oct 7, 2016

Copy link
Copy Markdown
Member Author

@thealphanerd unnecessary, thanks!

Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
Previously `TLSSocket#_emitTLSError` was used as an `error` event
handler. However that function can emit `error` event itself, so it is
not suitable for such use. Luckily the event can be emitted only when
the control is released, so this looping-error can't happen.

Replace the error handler for clarity and correctness.

PR-URL: #8889
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants