parent
edd6f58539
commit
2b210b3fcd
2 changed files with 6 additions and 2 deletions
|
@ -37482,7 +37482,9 @@ function PortManager(ports) {
|
||||||
PortManager.prototype = {
|
PortManager.prototype = {
|
||||||
constructor: PortManager,
|
constructor: PortManager,
|
||||||
getPort: function() {
|
getPort: function() {
|
||||||
return this.ports[this.idx++];
|
var port = this.ports[this.idx];
|
||||||
|
this.idx = (this.idx + 1) % this.ports.length;
|
||||||
|
return port;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@ function PortManager(ports) {
|
||||||
PortManager.prototype = {
|
PortManager.prototype = {
|
||||||
constructor: PortManager,
|
constructor: PortManager,
|
||||||
getPort: function() {
|
getPort: function() {
|
||||||
return this.ports[this.idx++];
|
var port = this.ports[this.idx];
|
||||||
|
this.idx = (this.idx + 1) % this.ports.length;
|
||||||
|
return port;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue