mirror of https://github.com/waku-org/js-waku.git
disable libp2p autodial (#1437)
This commit is contained in:
parent
d483644a4b
commit
96b111d07d
|
@ -166,6 +166,7 @@ export class ConnectionManager {
|
||||||
|
|
||||||
async dropConnection(peerId: PeerId): Promise<void> {
|
async dropConnection(peerId: PeerId): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
this.keepAliveManager.stop(peerId);
|
||||||
await this.libp2p.hangUp(peerId);
|
await this.libp2p.hangUp(peerId);
|
||||||
log(`Dropped connection with peer ${peerId.toString()}`);
|
log(`Dropped connection with peer ${peerId.toString()}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -164,6 +164,9 @@ export async function defaultLibp2p(
|
||||||
: {};
|
: {};
|
||||||
|
|
||||||
return createLibp2p({
|
return createLibp2p({
|
||||||
|
connectionManager: {
|
||||||
|
minConnections: 1,
|
||||||
|
},
|
||||||
transports: [webSockets({ filter: filterAll })],
|
transports: [webSockets({ filter: filterAll })],
|
||||||
streamMuxers: [mplex()],
|
streamMuxers: [mplex()],
|
||||||
connectionEncryption: [noise()],
|
connectionEncryption: [noise()],
|
||||||
|
|
Loading…
Reference in New Issue