-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Cleanup stream state in net #465
Conversation
Can you assess the semver impact of these patches? Do you think it's all okay to do in a patch release (no api changes) ? |
@piscisaureus I'm going to pull some npm packages today and run tests. It passes |
Is this blocked on anything? |
Not at present. I'd like to bring it in for the minor release this week if possible. |
return; | ||
self._writableState.errorEmitted = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... This was a bug fix, as far as I remember. Why doesn't it apply anymore?
Some nits, otherwise LGTM. Though, I'd like to have one more LGTM from the @piscisaureus or @bnoordhuis or @isaacs |
Edit: looked at commits, may not be necessary? |
@Fishrock123 I wouldn't mind giving you access to CI so you can be more proactive since you're one of the most attentive to the repo. Let me know if you're interested and I'll send you details via email. |
@rvagg I would like access to the CI please. |
@cjihrig of course! will get you set up and email. |
@rvagg sure. (just let me know what I should look for to run it on, I guess haha) |
@@ -262,6 +262,7 @@ information about the governance of the io.js project, see | |||
* **Fedor Indutny** ([@indutny](https://github.com/indutny)) <fedor.indutny@gmail.com> (Technical Committee) | |||
* **Trevor Norris** ([@trevnorris](https://github.com/trevnorris)) <trev.norris@gmail.com> (Technical Committee) | |||
* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> (Technical Committee) | |||
<br>Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... doesn't look like it belong here.
Looks like this pull request could use a rebase before it is merged @chrisdickinson. Besides that, is there anything holding this back from being merged? |
ping @chrisdickinson |
FYI: Seems to have one trivial merge conflict due to a change of Also, one test is failing for me:
I haven't looked any closer than that. |
@chrisdickinson just following up here. Could you rebase so we can revisit? |
Closing this because it feels a bit dicey. If someone else is interested in taking up the cause, feel free! |
part of #445
This set of patches removes much of the private state manipulation
net.Socket
was doing:this._writableState.decodeStrings = false
in favor of always settingoptions.decodeStrings = false
beforestream.Duplex.call(this, options)
.this._readableState.flowing = false
, callthis.pause()
. Since we have not returned from object instantiation, there should be no side effects.onSocketFinish
we are already not readable – whether that's because we started asreadable = false
or because we're in the dead zone betweenended = true
andreadable = false
. What this means in practice is that sockets that would have been destroyed here will instead be destroyed byonSocketEnd
(as thatnextTick
'd function completes.)errorEmitted
attribute was only made available for the purposes ofnet.Socket
(andtls.TLSSocket
), and even then only for errors that they can intercept themselves. I moved that attribute down to those child classes, because there's no need within Writable to track that information (basically trying to localize the illicit information spillage).R=@rvagg, @isaacs, or @bnoordhuis ?