File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/p2p-media-loader-core/src Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
27
27
} from "./utils/utils.js" ;
28
28
import { TRACKER_CLIENT_VERSION_PREFIX } from "./utils/peer.js" ;
29
29
import { SegmentStorage } from "./segment-storage/index.js" ;
30
+ import { P2PTrackerClient } from "./p2p/tracker-client.js" ;
30
31
31
32
/** Core class for managing media streams loading via P2P. */
32
33
export class Core < TStream extends Stream = Stream > {
@@ -432,6 +433,7 @@ export class Core<TStream extends Stream = Stream> {
432
433
this . segmentStorage = undefined ;
433
434
this . manifestResponseUrl = undefined ;
434
435
this . streamDetails = { isLive : false , activeLevelBitrate : 0 } ;
436
+ P2PTrackerClient . clearPeerIdCache ( ) ;
435
437
}
436
438
437
439
private async initializeSegmentStorage ( ) {
Original file line number Diff line number Diff line change @@ -162,4 +162,8 @@ export class P2PTrackerClient {
162
162
this . logger ( `peer closed: ${ peer . id } ` ) ;
163
163
this . _peers . delete ( peer . id ) ;
164
164
} ;
165
+
166
+ static clearPeerIdCache ( ) {
167
+ P2PTrackerClient . PEER_ID_BY_INFO_HASH . clear ( ) ;
168
+ }
165
169
}
You can’t perform that action at this time.
0 commit comments