Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply dial timeout globally #54

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions topology_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ func (t *Topology) hostOpts() []libp2p.Option {
// as the tests time out. By setting the timeout to a much lower value, we
// work around the timeout issue. Try to remove the following swarm options
// after https://github.com/libp2p/go-libp2p/issues/2589 was resolved.
localDialTimeout := 100 * time.Millisecond
swarmOpts := libp2p.SwarmOpts(swarm.WithDialTimeoutLocal(localDialTimeout))
// Also, the below should be changed to [swarm.WithDialTimeoutLocal]. Change
// that after https://github.com/libp2p/go-libp2p/pull/2595 is resolved.
dialTimeout := 100 * time.Millisecond
swarmOpts := libp2p.SwarmOpts(swarm.WithDialTimeout(dialTimeout))

return []libp2p.Option{swarmOpts}
}
Expand Down