mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 19:38:23 +00:00

This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: https://github.com/nodejs/node/pull/11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
316 B
JavaScript
15 lines
316 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const dgram = require('dgram');
|
|
|
|
// should not hang, see #1282
|
|
dgram.createSocket('udp4');
|
|
dgram.createSocket('udp6');
|
|
|
|
{
|
|
// Test the case of ref()'ing a socket with no handle.
|
|
const s = dgram.createSocket('udp4');
|
|
|
|
s.close(common.mustCall(() => s.ref()));
|
|
}
|