Browse Source

dgram: make setBroadcast() conform to v0.4 API

- don't return a value
v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
fc6a9673c8
  1. 6
      lib/dgram.js

6
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;
};

Loading…
Cancel
Save