mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 21:35:34 +00:00

Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
15 lines
367 B
JavaScript
15 lines
367 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const dgram = require('dgram');
|
|
|
|
const buf = Buffer.alloc(1024, 42);
|
|
|
|
const socket = dgram.createSocket('udp4');
|
|
|
|
socket.send(buf, 0, buf.length, common.PORT, 'localhost');
|
|
|
|
// if close callback is not function, ignore the argument.
|
|
socket.close('bad argument');
|
|
|
|
socket.on('close', common.mustCall(function() {}));
|