test: add mustCall to test-dgram-implicit-bind.js

PR-URL: https://github.com/nodejs/node/pull/27452
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
Chenxi Yuan 2019-04-28 16:49:45 +08:00 committed by oyyd
parent eecf100049
commit c3d4933210

View File

@ -36,11 +36,11 @@ target.on('message', common.mustCall(function(buf) {
}
}, 2));
target.on('listening', function() {
target.on('listening', common.mustCall(function() {
// Second .send() call should not throw a bind error.
const port = this.address().port;
source.send(Buffer.from('abc'), 0, 3, port, '127.0.0.1');
source.send(Buffer.from('def'), 0, 3, port, '127.0.0.1');
});
}));
target.bind(0);