Skip to content

Commit

Permalink
dgram: use simplified validator
Browse files Browse the repository at this point in the history
The `dgram` lib module should use the simplified `validatePort()`
validator.
  • Loading branch information
VoltrexKeyva committed Aug 12, 2021
1 parent 310ed47 commit e0f3c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
};

Socket.prototype.connect = function(port, address, callback) {
port = validatePort(port, 'Port', { allowZero: false });
port = validatePort(port, 'Port', false);
if (typeof address === 'function') {
callback = address;
address = '';
Expand Down

0 comments on commit e0f3c9d

Please sign in to comment.