GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Net: Defer reading until listeners could be added by jameshartig · Pull Request #1496 · nodejs/node

Conversation

@jameshartig

@jameshartig jameshartig commented Apr 22, 2015

Copy link
Copy Markdown
Contributor

Defer reading until user-land has a chance to add listeners. This
allows the TLS wrapper to listen for _tlsError and trigger a
clientError event if the socket already has data that could trigger.

Fixes #1114

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Apr 22, 2015
@jameshartig

jameshartig commented Apr 22, 2015

Copy link
Copy Markdown
Contributor Author

This also fixes nodejs/node-v0.x-archive#9355

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chrisdickinson
chrisdickinson reviewed Apr 22, 2015
View reviewed changes
Comment thread lib/_tls_wrap.js Outdated

@chrisdickinson chrisdickinson Apr 22, 2015

Copy link
Copy Markdown
Contributor

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.

I know this has just been moved, but we really need to standardize an API for querying the size of a stream's buffer.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jameshartig

jameshartig commented Apr 22, 2015

Copy link
Copy Markdown
Contributor Author

@chrisdickinson Updated to send along this as an arg to nextTick and added a check for if (!self._handle). I also removed ended from the tests that @brendanashworth brought up. Since we're not using unref we don't need to check that it ended since the process won't die until it has.

Thanks guys for taking a look at this so quickly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chrisdickinson
chrisdickinson reviewed Apr 22, 2015
View reviewed changes
Comment thread lib/_tls_wrap.js Outdated

@chrisdickinson chrisdickinson Apr 22, 2015

Copy link
Copy Markdown
Contributor

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.

could you name this anonymous function and pull it out of the constructor?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jameshartig jameshartig Apr 23, 2015

Copy link
Copy Markdown
Contributor Author

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.

Yup! Updated and moved into a named function above the constructor called initread

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jameshartig jameshartig changed the title Net: Defer reading until callbacks could be added Net: Defer reading until listeners could be added Apr 23, 2015
@jameshartig

jameshartig commented Apr 27, 2015

Copy link
Copy Markdown
Contributor Author

@chrisdickinson I moved the anonymous function to above the constructor. Everything else look good? Thanks again!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisdickinson

chrisdickinson commented Apr 27, 2015

Copy link
Copy Markdown
Contributor

LGTM! If @indutny does not object, I'll merge this tomorrow.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

indutny
indutny reviewed Apr 27, 2015
View reviewed changes
Comment thread lib/_tls_wrap.js Outdated

@indutny indutny Apr 27, 2015

Copy link
Copy Markdown
Member

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.

Camel case, please.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jameshartig jameshartig Apr 27, 2015

Copy link
Copy Markdown
Contributor Author

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.

Gotcha. I was trying to follow the function above onnewsession which was all lowercase so I thought that was the standard :/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jameshartig

jameshartig commented Apr 27, 2015

Copy link
Copy Markdown
Contributor Author

@indutny I renamed to initRead. If you want me to keep the ended var and checks in the tests, I can add those back, just let me know. Thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jameshartig

jameshartig commented May 3, 2015

Copy link
Copy Markdown
Contributor Author

@indutny would you mind taking another look after the changes I made? Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jameshartig

jameshartig commented May 27, 2015

Copy link
Copy Markdown
Contributor Author

Any updates @indutny @chrisdickinson ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented May 27, 2015

Copy link
Copy Markdown
Member

LGTM, @chrisdickinson please land!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis
bnoordhuis force-pushed the master branch from 311c3e4 to b926718 Compare June 2, 2015 17:25
brendanashworth
brendanashworth reviewed Jun 8, 2015
View reviewed changes
Comment thread test/parallel/test-tls-delayed-attach-error.js

@brendanashworth brendanashworth Jun 8, 2015

Copy link
Copy Markdown
Contributor

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.

A 'use strict'; now needs to be added here with the new linter.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jameshartig

jameshartig commented Jun 8, 2015

Copy link
Copy Markdown
Contributor Author

@brendanashworth updated with 'use strict'; and linter seems to like it and tests still pass.

@chrisdickinson good to go?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 16, 2015

Copy link
Copy Markdown
Contributor

CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/10/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 16, 2015

Copy link
Copy Markdown
Contributor

hmm... the linter job failed. @fastest963 could you rebase your remote branch onto master and push to GH (preferably with a make lint beforehand)? It might need an update.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jameshartig

jameshartig commented Jun 16, 2015

Copy link
Copy Markdown
Contributor Author

@brendanashworth It looks like it failed because it couldn't find ./iojs:

[linter] $ /bin/sh -xe /tmp/hudson2733538223575635564.sh
+ NODE=/usr/local/bin/iojs make lint
gmake[1]: Entering directory '/usr/home/iojs/build/workspace/iojs+linter/nodes/linter'
./iojs tools/eslint/bin/eslint.js src lib test --reset --quiet
gmake[1]: ./iojs: Command not found
Makefile:378: recipe for target 'jslint' failed
gmake[1]: *** [jslint] Error 127
gmake[1]: Leaving directory '/usr/home/iojs/build/workspace/iojs+linter/nodes/linter'
*** Error code 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jameshartig
Net: Defer reading until listeners could be added
0042c14
Defer reading until user-land has a chance to add listeners. This
allows the TLS wrapper to listen for _tlsError and trigger a
clientError event if the socket already has data that could trigger.

Fixes #1114
@brendanashworth

brendanashworth commented Jun 16, 2015

Copy link
Copy Markdown
Contributor

I don't work on build but I think you need the recent updates to the
Makefile to lint on the CI. <surprise!> Could you rebase, then I'll try to
run it again.

Sorry about this, its a new CI setup. I'm still getting used to it.

On Monday, June 15, 2015, James Hartig [email protected] wrote:

@brendanashworth https://github.com/brendanashworth It looks like it
failed because of:

[linter] $ /bin/sh -xe /tmp/hudson2733538223575635564.sh

  • NODE=/usr/local/bin/iojs make lint
    gmake[1]: Entering directory '/usr/home/iojs/build/workspace/iojs+linter/nodes/linter'
    ./iojs tools/eslint/bin/eslint.js src lib test --reset --quiet
    gmake[1]: ./iojs: Command not found
    Makefile:378: recipe for target 'jslint' failed
    gmake[1]: *** [jslint] Error 127
    gmake[1]: Leaving directory '/usr/home/iojs/build/workspace/iojs+linter/nodes/linter'
    *** Error code 2

—
Reply to this email directly or view it on GitHub
#1496 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jameshartig

jameshartig commented Jun 16, 2015

Copy link
Copy Markdown
Contributor Author

No problem! I just rebased and pushed, want to try again? Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 16, 2015

Copy link
Copy Markdown
Contributor

perfecto: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/14/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brendanashworth pushed a commit that referenced this pull request Jun 17, 2015
@jameshartig @brendanashworth
net: Defer reading until listeners could be added
061342a
Defer reading until user-land has a chance to add listeners. This
allows the TLS wrapper to listen for _tlsError and trigger a
clientError event if the socket already has data that could trigger.

Fixes: #1114
PR-URL: #1496
Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@brendanashworth

brendanashworth commented Jun 17, 2015

Copy link
Copy Markdown
Contributor

Thanks for the pull request! Landed in 061342a.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth brendanashworth closed this Jun 17, 2015
@brendanashworth brendanashworth mentioned this pull request Jun 17, 2015
Already buffered data when creating a TLSSocket doesn't trigger/throw 'error' #1114
Closed
@rvagg rvagg mentioned this pull request Jun 18, 2015
Release proposal: v2.3.1 #1996
Closed
@snyk-bot snyk-bot mentioned this pull request Jul 14, 2021
[Snyk] Upgrade protobufjs from 6.8.8 to 6.11.2 Zintexiss/node-22#27
Open
@snyk-bot snyk-bot mentioned this pull request Feb 12, 2022
[Snyk] Upgrade protobufjs from 6.8.8 to 6.11.2 Iceymann18777/node#9
Open
@MaxMood96 MaxMood96 mentioned this pull request May 23, 2022
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 MaxMood96/node#22
Open
@ryan-ally ryan-ally mentioned this pull request May 23, 2022
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 ryan-ally/node#62
Open
This was referenced May 24, 2022
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 baby636/node#55
Open
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 Mement-Mori/node#20
Open
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 adamlaska/node#68
Open
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 turkdevops/node#371
Open
@snyk-bot snyk-bot mentioned this pull request Aug 19, 2022
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 MarcelRaschke/node#1
Open
@snyk-bot snyk-bot mentioned this pull request Apr 25, 2023
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 aliscco/alisco-node#181
Open
@leonardoadame leonardoadame mentioned this pull request Jul 8, 2023
[Snyk] Security upgrade protobufjs from 6.8.8 to 6.11.3 leonardoadame/node#106
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Already buffered data when creating a TLSSocket doesn't trigger/throw 'error'

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@jameshartig @chrisdickinson @indutny @brendanashworth @mscdex
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.