فهرست منبع

raft: minor change on code

Yicheng Qin 11 سال پیش
والد
کامیت
431ff3cce1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      raft/node.go

+ 1 - 1
raft/node.go

@@ -195,7 +195,7 @@ func (n *Node) Next() []Entry {
 // If the current elapsed is greater or equal than the timeout,
 // node will send corresponding message to the statemachine.
 func (n *Node) Tick() {
-	if n.sm.promotable == false {
+	if !n.sm.promotable {
 		return
 	}