Skip to content

Commit

Permalink
Timeout changed to 1 second. Feels more wise choicee
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Golev committed Mar 11, 2020
1 parent 059c986 commit 46074f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dkron/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (a *Agent) checkAndSelectServer() (string, error) {

for _, peer := range peers {
log.Debugf("Checking peer: %v", peer)
conn, err := net.DialTimeout("tcp", peer, 5*time.Second)
conn, err := net.DialTimeout("tcp", peer, 1*time.Second)
if err == nil {
conn.Close()
log.Debugf("Found good peer: %v", peer)
Expand Down

0 comments on commit 46074f4

Please sign in to comment.