Skip to content

Commit 1002963

Browse files
minor improvements
1 parent ee659cd commit 1002963

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/src/lib/keep_alive_manager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ export class KeepAliveManager {
5656
return KeepAliveManager.instance;
5757
}
5858

59-
public getPing(peerId: PeerId): Promise<number> {
59+
public async getPing(peerId: PeerId): Promise<number> {
6060
const ping = this.peerPings.get(peerId.toString());
6161
if (!ping) {
62-
return this.libp2pPing.ping(peerId);
62+
return await this.libp2pPing.ping(peerId);
6363
}
64-
return Promise.resolve(ping);
64+
return ping;
6565
}
6666

6767
public start(peerId: PeerId): void {

packages/tests/tests/utils.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe("Util: toAsyncIterator: Filter", () => {
118118

119119
const TestCodec = "test/1";
120120

121-
describe.only("selectPeerForProtocol", () => {
121+
describe("selectPeerForProtocol", () => {
122122
let peerStore: PeerStore;
123123
let getPingStub: sinon.SinonStub;
124124
const protocols = [TestCodec];

0 commit comments

Comments
 (0)