diff --git a/packages/core/src/lib/connection_manager.ts b/packages/core/src/lib/connection_manager.ts index ed2de604bb..e01f97f9a6 100644 --- a/packages/core/src/lib/connection_manager.ts +++ b/packages/core/src/lib/connection_manager.ts @@ -166,6 +166,7 @@ export class ConnectionManager { async dropConnection(peerId: PeerId): Promise { try { + this.keepAliveManager.stop(peerId); await this.libp2p.hangUp(peerId); log(`Dropped connection with peer ${peerId.toString()}`); } catch (error) { diff --git a/packages/sdk/src/create.ts b/packages/sdk/src/create.ts index 8a10abf9a2..b9eb138bda 100644 --- a/packages/sdk/src/create.ts +++ b/packages/sdk/src/create.ts @@ -164,6 +164,9 @@ export async function defaultLibp2p( : {}; return createLibp2p({ + connectionManager: { + minConnections: 1, + }, transports: [webSockets({ filter: filterAll })], streamMuxers: [mplex()], connectionEncryption: [noise()],