Skip to content

added noop method unref to Socket#1612

Merged
paulmelnikow merged 1 commit intonock:betafrom
zenlor:bug/socket-deref
Jul 9, 2019
Merged

added noop method unref to Socket#1612
paulmelnikow merged 1 commit intonock:betafrom
zenlor:bug/socket-deref

Conversation

@zenlor
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Thanks @zenlor and @mastermatt!

@nockbot
Copy link
Copy Markdown
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
Copy Markdown
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
juninmd pushed a commit to juninmd/nock that referenced this pull request Mar 21, 2026
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.

4 participants