Skip to content

Commit

Permalink
fixed ports limit fixes #50
Browse files Browse the repository at this point in the history
  • Loading branch information
sebpiq committed Feb 9, 2015
1 parent fab84fb commit a396f7d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions bin/rhizome.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var httpServer, wsServer, oscServer
var httpValidator = new coreValidation.ChaiValidator({
port: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(0, 65535)
},
staticDir: function(val, doneDirName) {
expect(val).to.be.a('string')
Expand Down
4 changes: 2 additions & 2 deletions lib/osc/BlobClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ _.extend(Client.prototype, coreValidation.ValidateConfigMixin, {
},
blobsPort: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(1025, 49150)
expect(val).to.be.within(0, 65535)
},
serverBlobsPort: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(1025, 49150)
expect(val).to.be.within(0, 65535)
},
serverHostname: function(val) {
expect(val).to.be.an.ip
Expand Down
4 changes: 2 additions & 2 deletions lib/osc/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ _.extend(OSCServer.prototype, coreValidation.ValidateConfigMixin, coreServer.Ser
configValidator: new coreValidation.ChaiValidator({
blobsPort: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(1025, 49150)
expect(val).to.be.within(0, 65535)
},
port: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(1025, 49150)
expect(val).to.be.within(0, 65535)
}
}),

Expand Down
1 change: 1 addition & 0 deletions lib/websockets/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ _.extend(Client.prototype, EventEmitter.prototype, coreValidation.ValidateConfig
configValidator: new coreValidation.ChaiValidator({
port: function(val) {
expect(val).to.be.a('number')
expect(val).to.be.within(0, 65535)
},
hostname: function(val) {
expect(val).to.be.a('string')
Expand Down
1 change: 1 addition & 0 deletions lib/websockets/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ _.extend(WebSocketServer.prototype, coreServer.Server.prototype, coreValidation.
port: function(val) {
if (this.serverInstance) return
expect(val).to.be.a('number')
expect(val).to.be.within(0, 65535)
},
usersLimit: function(val) {
expect(val).to.be.a('number')
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"scripts": {
"test": "mocha test/ --recursive --timeout 20000",
"coverage": "istanbul cover _mocha -- test --reporter spec --recursive"
"coverage": "istanbul cover _mocha -- test --reporter spec --recursive",
"cloc": "cloc bin/ lib/"
}
}

0 comments on commit a396f7d

Please sign in to comment.