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 — events: implement EventEmitter#getMaxListeners() by tellnes · Pull Request #82 · nodejs/node

Conversation

@tellnes

@tellnes tellnes commented Dec 5, 2014

Copy link
Copy Markdown
Contributor

fixes nodejs/node-v0.x-archive#8237

Sorry, something went wrong.

Uh oh!

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

All reactions
kenany
kenany reviewed Dec 5, 2014
View reviewed changes
Comment thread doc/api/events.markdown Outdated

@kenany kenany Dec 5, 2014

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.

s/usefull/useful

Maybe clarify what warning? I know the warning but might be better to specify.

Sorry, something went wrong.

Uh oh!

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

All reactions
@tellnes
tellnes force-pushed the getMaxListeners branch from def554f to dfe3ecf Compare December 5, 2014 14:06
@tellnes

tellnes commented Dec 5, 2014

Copy link
Copy Markdown
Contributor Author

@kenany Thanks for feedback. I've addressed your issues.

About clarifying the warning. Yes, I think that should be done, but I think it is out of scope for this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

yorkie
yorkie reviewed Dec 5, 2014
View reviewed changes
Comment thread lib/events.js Outdated

@tellnes tellnes Dec 5, 2014

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.

Yeah, I was thinking about that. It will return Infinity if you have done setMaxListeners(Infinity). But it is documented that 0 means unlimited and I think being concise with existing api is best.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bnoordhuis

bnoordhuis commented Dec 5, 2014

Copy link
Copy Markdown
Member

Some style issues but otherwise LGTM. I'd like one more person to sign off on this.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tellnes
events: implement EventEmitter#getMaxListeners()
9de06aa
fixes nodejs/node-v0.x-archive#8237
@tellnes
tellnes force-pushed the getMaxListeners branch from dfe3ecf to 9de06aa Compare December 5, 2014 20:16
@tellnes

tellnes commented Dec 5, 2014

Copy link
Copy Markdown
Contributor Author

I've fixed all comments so far. The only thing missing is if it should return Infinity if the value is zero as proposed by @yorkie in an outdated diff.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnoordhuis

bnoordhuis commented Dec 5, 2014

Copy link
Copy Markdown
Member

I would just make it return zero. Intuitively, I would expect ee.setMaxListeners(0).getMaxListeners() to return zero, not infinity. Principle of Least Surprise and all that.

I'll land this PR assuming tests pass. If someone feels strongly about the return value, they can follow up with a PR of their own.

All reactions

Sorry, something went wrong.

Uh oh!

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

@chrisdickinson

chrisdickinson commented Dec 5, 2014

Copy link
Copy Markdown
Contributor

LGTM.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnoordhuis

bnoordhuis commented Dec 5, 2014

Copy link
Copy Markdown
Member

Landed in 0115a5e. Thanks, Christian!

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnoordhuis bnoordhuis closed this Dec 5, 2014
bnoordhuis pushed a commit that referenced this pull request Dec 5, 2014
@tellnes @bnoordhuis
events: implement EventEmitter#getMaxListeners()
2931348
Fixes nodejs/node-v0.x-archive#8237.

PR-URL: #82
Reviewed-By: Ben Noordhuis <[email protected]>
@bnoordhuis

bnoordhuis commented Dec 5, 2014

Copy link
Copy Markdown
Member

Sorry about that, I screwed up the commit. 2931348 it is.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rvagg rvagg mentioned this pull request Jan 3, 2015
governance: Add new Collaborators #234
Closed
@brendanashworth brendanashworth added semver-minor PRs that contain new features and should be released in the next minor version. events Issues and PRs related to EventEmitter and the events module. labels Aug 15, 2015
@joyeecheung joyeecheung mentioned this pull request Feb 20, 2020
repl: printing big strings results in OOM #25478
Closed
@snyk-bot snyk-bot mentioned this pull request May 5, 2020
[Snyk] Upgrade remark-preset-lint-node from 1.13.0 to 1.15.0 137717unity/node#4
Open
@wmertens wmertens mentioned this pull request Jun 19, 2020
uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed. #33966
Closed
@snyk-bot snyk-bot mentioned this pull request Sep 26, 2020
[Snyk] Upgrade remark-preset-lint-node from 1.9.0 to 1.16.0 Qdigital/node#1
Open
@ml-costmo ml-costmo mentioned this pull request Aug 23, 2021
fs.rmdirSync leaves files on FS as "deleted" until script completion #39853
Closed
This was referenced Sep 15, 2021
[Snyk] Fix for 1 vulnerabilities solebox/node#25
Open
[Snyk] Fix for 1 vulnerabilities saeedahassan/node#35
Open
This was referenced Sep 16, 2021
[Snyk] Fix for 1 vulnerabilities erdun/node#41
Open
[Snyk] Fix for 1 vulnerabilities enterstudio/node#24
Open
[Snyk] Fix for 1 vulnerabilities s4sc/node#24
Open
This was referenced Nov 16, 2021
[Snyk] Security upgrade npmlog from 5.0.1 to 6.0.0 thisguy726/node#4
Open
[Snyk] Security upgrade npmlog from 5.0.1 to 6.0.0 MaxMood96/node#15
Open
@verdinjoshua1982 verdinjoshua1982 mentioned this pull request Oct 14, 2022
[Snyk] Upgrade @npmcli/run-script from 2.0.0 to 4.2.1 verdinjoshua1982/node#4
Open
vlomovtsev pushed a commit to auriga-foss/node that referenced this pull request Feb 14, 2023
Vadim Lomovtsev
kos/image_builder/einit/CMakeLists.txt: add extra mount options for p…
a503da2
…recompiled_vfsVfsNet

While working with NodeJS tests it was found that some of them (tests)
requires access to /etc/hosts file and so the getaddrinfo() call falls
to error.

The quote from developers:
> The issue was nailed down to the ramdisk access for the entity which
> implements network access (precompiled_vfsVfsNet). As appropriated
> partition hasn't been mounted for it (so it is not exists for it). The
> access to the ramdisk is covered by another entity, called
> precompiled_vfsVfsRamFs. So it is required to configure (allow) access
> for the precompiled_vfsVfsNet to the ramdisk over explicit properties.
>
> Besides of that it is required to add the 'hosts' file to the romfs
> image, to make it accessible by application over /etc mount from romfs.

TFS: nodejs#82

Signed-off-by: Vadim Lomovtsev <[email protected]>
@surlyhacker surlyhacker mentioned this pull request Jun 24, 2023
Http2Stream write() never fails after network disconnect (Linux) #48539
Closed
@leonardoadame leonardoadame mentioned this pull request Jul 6, 2023
[Snyk] Fix for 112 vulnerabilities leonardoadame/node#22
Open
@ghost ghost mentioned this pull request Jul 11, 2023
Test runner executes after() in declared order #48736
Closed
@Bhanditz Bhanditz mentioned this pull request Nov 26, 2023
[Snyk] Fix for 2 vulnerabilities Bhanditz/node#34
Open
@bumplzz69 bumplzz69 mentioned this pull request Nov 26, 2023
[Snyk] Fix for 2 vulnerabilities bumplzz69/node#54
Open
@RoeeOren RoeeOren mentioned this pull request Nov 27, 2023
[Snyk] Fix for 2 vulnerabilities RoeeOren/node#41
Open
@Verdinjoshua26 Verdinjoshua26 mentioned this pull request Nov 27, 2023
[Snyk] Fix for 1 vulnerabilities Verdinjoshua26/node#49
Open
@Matthelonianxl Matthelonianxl mentioned this pull request Nov 27, 2023
[Snyk] Fix for 1 vulnerabilities Matthelonianxl/node#56
Open
@sirinartk sirinartk mentioned this pull request Nov 28, 2023
[Snyk] Fix for 1 vulnerabilities sirinartk/node#46
Open
@timzwit timzwit mentioned this pull request Nov 28, 2023
[Snyk] Fix for 2 vulnerabilities timzwit/node#30
Open
@vaibhavb vaibhavb mentioned this pull request Nov 28, 2023
[Snyk] Fix for 2 vulnerabilities vaibhavb/node#43
Open
@awaisab172 awaisab172 mentioned this pull request Nov 29, 2023
[Snyk] Fix for 1 vulnerabilities awaisab172/node#49
Open
@ajesse11x ajesse11x mentioned this pull request Nov 29, 2023
[Snyk] Fix for 2 vulnerabilities ajesse11x/node#44
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

events Issues and PRs related to EventEmitter and the events module. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@tellnes @bnoordhuis @chrisdickinson @kenany @brendanashworth
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.