Skip to content

Commit

Permalink
etcdserver: make dial timeout longer
Browse files Browse the repository at this point in the history
  • Loading branch information
xiang90 committed Sep 22, 2017
1 parent 6515a1d commit 2303232
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions etcdserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ func (c *ServerConfig) electionTimeout() time.Duration {
}

func (c *ServerConfig) peerDialTimeout() time.Duration {
// 1s for queue wait and system delay
// + one RTT, which is smaller than 1/5 election timeout
return time.Second + time.Duration(c.ElectionTicks)*time.Duration(c.TickMs)*time.Millisecond/5
// 1s for queue wait and election timeout
return time.Second + time.Duration(c.ElectionTicks)*time.Duration(c.TickMs)*time.Millisecond
}

func (c *ServerConfig) PrintWithInitial() { c.print(true) }
Expand Down

0 comments on commit 2303232

Please sign in to comment.