Fix undefined websocket port

Fixes #889

// FREEBIE
This commit is contained in:
lilia 2016-09-12 11:43:48 -07:00
parent edd6f58539
commit 2b210b3fcd
2 changed files with 6 additions and 2 deletions

View file

@ -37482,7 +37482,9 @@ function PortManager(ports) {
PortManager.prototype = {
constructor: PortManager,
getPort: function() {
return this.ports[this.idx++];
var port = this.ports[this.idx];
this.idx = (this.idx + 1) % this.ports.length;
return port;
}
};

View file

@ -10,7 +10,9 @@ function PortManager(ports) {
PortManager.prototype = {
constructor: PortManager,
getPort: function() {
return this.ports[this.idx++];
var port = this.ports[this.idx];
this.idx = (this.idx + 1) % this.ports.length;
return port;
}
};