core/tracker: avoid putting duplicate target address in this._tracks
This commit is contained in:
parent
2b49b9f8a8
commit
d80630635c
@ -38,9 +38,11 @@ export class Tracker {
|
||||
}
|
||||
|
||||
setTargetAddress(host, port) {
|
||||
this._targetHost = host;
|
||||
this._targetPort = port;
|
||||
this._tracks.push(`${host}:${port}`);
|
||||
if (host !== this._targetHost && port !== this._targetPort) {
|
||||
this._targetHost = host;
|
||||
this._targetPort = port;
|
||||
this._tracks.push(`${host}:${port}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user