feat(cluster_config): change field from int to float64

This is modified for better flexibility, especially for testing.
This commit is contained in:
Yicheng Qin
2014-05-12 22:42:18 -04:00
parent 5367c1c998
commit c0027bfc78
6 changed files with 73 additions and 22 deletions

View File

@ -817,7 +817,7 @@ func (s *PeerServer) monitorPeerActivity() {
// Check last activity for all peers.
now := time.Now()
removeDelay := time.Duration(s.ClusterConfig().RemoveDelay) * time.Second
removeDelay := time.Duration(int64(s.ClusterConfig().RemoveDelay * float64(time.Second)))
peers := s.raftServer.Peers()
for _, peer := range peers {
// If the last response from the peer is longer than the remove delay