Skip to content
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

added noop method unref to Socket #1612

Merged
merged 1 commit into from Jul 9, 2019
Merged

Conversation

zenlor
Copy link
Contributor

@zenlor zenlor commented Jul 9, 2019

it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/net.html#net_socket_unref

I came across this while mocking tests for a project using apm-nodejs-http-client ^

it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/net.html#net_socket_unref
Copy link
Member

@mastermatt mastermatt left a comment

Choose a reason for hiding this comment

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

I was going to recommend making it a function that returns the socket, since that's what the real Socket def does for chaining. However, the other three method that use noop are in the same boat and it probably makes more sense to keep them the same. And we can change them all to return the socket if that need ever arises.

I think it's good as is.

@paulmelnikow paulmelnikow merged commit a75f49f into nock:beta Jul 9, 2019
@paulmelnikow
Copy link
Member

Thanks @zenlor and @mastermatt!

@nockbot
Copy link
Collaborator

nockbot commented Jul 9, 2019

🎉 This PR is included in version 11.0.0-beta.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Collaborator

nockbot commented Aug 12, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

gr2m pushed a commit that referenced this pull request Sep 4, 2019
it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/net.html#net_socket_unref
gr2m pushed a commit that referenced this pull request Sep 4, 2019
it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/net.html#net_socket_unref
gr2m pushed a commit that referenced this pull request Sep 5, 2019
it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/net.html#net_socket_unref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants