Skip to content

Commit

Permalink
Reduce max wait time to initialize peer connections
Browse files Browse the repository at this point in the history
setting rand time range to 100-300ms instead of 100-800ms
  • Loading branch information
mlsmaycon committed Dec 4, 2024
1 parent b50b89b commit 6402b53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/internal/peer/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func (conn *Conn) doOnConnected(remoteRosenpassPubKey []byte, remoteRosenpassAdd

func (conn *Conn) waitInitialRandomSleepTime(ctx context.Context) {
minWait := 100
maxWait := 800
maxWait := 300
duration := time.Duration(rand.Intn(maxWait-minWait)+minWait) * time.Millisecond

timeout := time.NewTimer(duration)
Expand Down

0 comments on commit 6402b53

Please sign in to comment.