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

- don't return a value
v0.7.4-release
Ben Noordhuis 2012-01-23 21:28:30 +01:00
parent ed111975a0
commit fc6a9673c8
1 changed files with 2 additions and 4 deletions

View File

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