switch to a per DialPeer/NewStream timeout defined in go-libp2p-net
The global per-peer dial timeout had a significant drawback: When dialing many peers, this timeout could cause libp2p to cancel dials while they were still stuck in the limiter. A better but more complicated approach is a time budget system but we can implement that later. This change simply applies the limit to each `DialPeer`/`NewStream` call independently and makes it easy to override. While old timeout tried to account for how much we're willing to spend dialing a single peer, this new timeout tries to account for the amount of time a single "client" is willing to wait for a dial to complete before they no longer care.
Showing
Please register or sign in to comment