Skip to content

Commit

Permalink
Improve communication timeout error message
Browse files Browse the repository at this point in the history
  • Loading branch information
aminst committed Feb 27, 2024
1 parent 84546f3 commit b3604a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rpc/communicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func CallAllReplicas(ctx context.Context, clients []interface{}, replicaFuncs []
responseChannel <- result{reply: reply, err: err}
}(clientFunc, clients[i])
}
timeout := time.After(5 * time.Second)
timeout := time.After(50 * time.Second)
var errors []error
for {
select {
Expand All @@ -41,7 +41,7 @@ func CallAllReplicas(ctx context.Context, clients []interface{}, replicaFuncs []
log.Debug().Msgf("Returning result in CallAllReplicas %v", result.reply)
return result.reply, nil
case <-timeout:
return nil, fmt.Errorf("could not read blocks from the replicas")
return nil, fmt.Errorf("timeout while waiting for all replicas to respond")
}
}
}

0 comments on commit b3604a4

Please sign in to comment.