FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tls,net: fix shutdown issue more cleanly by addaleax · Pull Request #24290 · nodejs/node · GitHub

/ node Public

tls,net: fix shutdown issue more cleanly - #24290

Closed
addaleax wants to merge 3 commits into
nodejs:masterfrom
addaleax:clean-fix-streamwrap-shutdown
Closed

tls,net: fix shutdown issue more cleanly#24290
addaleax wants to merge 3 commits into
nodejs:masterfrom
addaleax:clean-fix-streamwrap-shutdown

Conversation

Copy link
Copy Markdown
Member
  • tls: do not rely on 'drain' handlers in StreamWrap

'drain' event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

  • tls: destroy TLS socket if StreamWrap is destroyed

Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

  • Revert "net: partially revert "simplify Socket.prototype._final""

This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added net Issues and PRs related to the net subsystem. tls Issues and PRs related to the tls subsystem. labels Nov 10, 2018

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/18512/

I’d love a review from @oyyd on this? :)

Comment thread lib/_tls_wrap.js

oyyd commented Nov 11, 2018

Copy link
Copy Markdown
Contributor

Left a comment but LGTM 👍

danbev commented Nov 16, 2018

Copy link
Copy Markdown
Contributor

oyyd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

(As I can do this now)

Trott added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Nov 16, 2018

Copy link
Copy Markdown
Member Author

Landed in 62d053b...8cdb92f

addaleax closed this Nov 16, 2018
addaleax deleted the clean-fix-streamwrap-shutdown branch November 16, 2018 09:18
addaleax added a commit that referenced this pull request Nov 16, 2018
`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
addaleax added a commit that referenced this pull request Nov 16, 2018
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
addaleax added a commit that referenced this pull request Nov 16, 2018
This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
targos pushed a commit that referenced this pull request Nov 18, 2018
`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
targos pushed a commit that referenced this pull request Nov 18, 2018
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
targos pushed a commit that referenced this pull request Nov 18, 2018
This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
BridgeAR mentioned this pull request Dec 5, 2018
4 tasks
codebytere pushed a commit that referenced this pull request Jan 12, 2019
`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
codebytere pushed a commit that referenced this pull request Jan 12, 2019
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
codebytere pushed a commit that referenced this pull request Jan 12, 2019
This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
codebytere mentioned this pull request Jan 15, 2019
codebytere pushed a commit that referenced this pull request Jan 29, 2019
`'drain'` event handlers may not be invoked if the stream
is currently finishing. Instead, use the fact that we know
when writes are active or not, and invoke the delayed shutdown
handler from our own after-write callback.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
codebytere pushed a commit that referenced this pull request Jan 29, 2019
Previously, there was no mechanism in place that would
have destroyed the TLS socket once the underlying socket
had been closed.

PR-URL: #24290
Refs: #24288
Refs: #24075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
codebytere pushed a commit that referenced this pull request Jan 29, 2019
This reverts commit ac1f56c.

Refs: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. net Issues and PRs related to the net subsystem. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL