This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

- don't return a value
  • Loading branch information...
bnoordhuis committed Jan 23, 2012
1 parent ed11197 commit fc6a9673c8ec6e22565bb5a837f33b845e5127ce
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/dgram.js
View
@@ -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;
};

0 comments on commit fc6a967

Please sign in to comment.