Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6a07f45

Browse files
committedSep 7, 2023
use the new KeepAliveManager API
1 parent 160c680 commit 6a07f45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎packages/core/src/lib/connection_manager.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ export class ConnectionManager
116116
...options
117117
};
118118

119-
this.keepAliveManager = new KeepAliveManager(keepAliveOptions, relay);
119+
this.keepAliveManager = KeepAliveManager.createInstance(
120+
this.libp2p.services.ping,
121+
keepAliveOptions,
122+
relay
123+
);
120124

121125
this.run()
122126
.then(() => log(`Connection Manager is now running`))
@@ -340,7 +344,7 @@ export class ConnectionManager
340344
void (async () => {
341345
const peerId = evt.detail;
342346

343-
this.keepAliveManager.start(peerId, this.libp2p.services.ping);
347+
this.keepAliveManager.start(peerId);
344348

345349
const isBootstrap = (await this.getTagNamesForPeer(peerId)).includes(
346350
Tags.BOOTSTRAP

0 commit comments

Comments
 (0)
Please sign in to comment.