소스 검색

raft: remove unused return

Yicheng Qin 11 년 전
부모
커밋
9607665323
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      raft/node.go

+ 1 - 4
raft/node.go

@@ -46,7 +46,6 @@ func (rd Ready) containsUpdates() bool {
 }
 }
 
 
 type Node struct {
 type Node struct {
-	ctx    context.Context
 	propc  chan pb.Message
 	propc  chan pb.Message
 	recvc  chan pb.Message
 	recvc  chan pb.Message
 	readyc chan Ready
 	readyc chan Ready
@@ -137,12 +136,10 @@ func (n *Node) run(r *raft) {
 
 
 // Tick increments the internal logical clock for this Node. Election timeouts
 // Tick increments the internal logical clock for this Node. Election timeouts
 // and heartbeat timeouts are in units of ticks.
 // and heartbeat timeouts are in units of ticks.
-func (n *Node) Tick() error {
+func (n *Node) Tick() {
 	select {
 	select {
 	case n.tickc <- struct{}{}:
 	case n.tickc <- struct{}{}:
-		return nil
 	case <-n.done:
 	case <-n.done:
-		return ErrStopped
 	}
 	}
 }
 }