Compare commits

..

2 Commits

Author SHA1 Message Date
Derrick Hammer b3d6fd4668
*Update dist 2023-04-16 05:48:53 -04:00
Derrick Hammer b04db8668b
*Put _nextPeer into the constructor 2023-04-16 05:48:32 -04:00
2 changed files with 5 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class MultiSocketProxy extends proxy_js_1.default {
}
socketClass;
_peers = new Map();
_nextPeer = (0, util_js_1.roundRobinFactory)(this._peers);
_nextPeer;
_server = false;
_allowedPorts = [];
constructor(options) {
@ -87,6 +87,7 @@ class MultiSocketProxy extends proxy_js_1.default {
if (options.server) {
this._server = true;
}
this._nextPeer = (0, util_js_1.roundRobinFactory)(this._peers);
}
_socketMap = new Map();
get socketMap() {

View File

@ -89,9 +89,10 @@ export default class MultiSocketProxy extends Proxy {
await conn.init();
this.emit("peer", conn);
}
private socketClass: any;
private _peers: Map<string, PeerEntity> = new Map<string, PeerEntity>();
private _nextPeer = roundRobinFactory(this._peers);
private _nextPeer;
private _server = false;
private _allowedPorts = [];
@ -109,6 +110,7 @@ export default class MultiSocketProxy extends Proxy {
if (options.server) {
this._server = true;
}
this._nextPeer = roundRobinFactory(this._peers);
}
private _socketMap = new Map<number, number>();