◐ Shell
clean mode source ↗

dgram: tracking unrefdness of dgram sockets by thlorenz · Pull Request #5828 · nodejs/node

- initializing `_unref` to `false` when the socket is created
- updating that value each time either `unref()` or `ref()` is invoked
  on it
- this mirrors the implementation in `lib/net.js`
- adding test to check unrefdness tracking

@mscdex added the dgram

Issues and PRs related to the dgram subsystem / UDP.

label

Mar 21, 2016

@jasnell jasnell added the semver-minor

PRs that contain new features and should be released in the next minor version.

label

Mar 21, 2016
- using strictEquals for tests

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 7, 2016
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.

Also, this is useful even to node's internals, particularly timers.

Refs: nodejs#5828
Refs: nodejs#5827
PR-URL: nodejs#5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

evanlucas pushed a commit that referenced this pull request

May 17, 2016
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.

Also, this is useful even to node's internals, particularly timers.

Refs: #5828
Refs: #5827
PR-URL: #5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>