diff --git a/lib/dgram.js b/lib/dgram.js index 4166b026e1b..2e8071ca121 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -223,11 +223,9 @@ Socket.prototype.address = function() { Socket.prototype.setBroadcast = function(arg) { - if (this._handle.setBroadcast((arg) ? 1 : 0) == -1) { - throw errnoException(errno, 'setBroadcast'); + if (this._handle.setBroadcast((arg) ? 1 : 0)) { + throw errnoException(errno, 'setBroadcast'); } - - return true; };