Skip to content

Commit 936dbba

Browse files
authored
fix: decrease default dial timeout (#2471)
30s is far too long for a default dial timeout and can cause dialing unresponsive peers with multiple valid addresses to block the dial queue. Decrease to 5s.
1 parent 2b2958f commit 936dbba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/libp2p/src/connection-manager/constants.defaults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#dialTimeout
33
*/
4-
export const DIAL_TIMEOUT = 30e3
4+
export const DIAL_TIMEOUT = 5e3
55

66
/**
77
* @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#inboundUpgradeTimeout
88
*/
9-
export const INBOUND_UPGRADE_TIMEOUT = 30e3
9+
export const INBOUND_UPGRADE_TIMEOUT = 2e3
1010

1111
/**
1212
* @see https://libp2p.github.io/js-libp2p/interfaces/index._internal_.ConnectionManagerConfig.html#maxPeerAddrsToDial

0 commit comments

Comments
 (0)