浏览代码

Merge pull request #6396 from heyitsanthony/rafthttp-msg-leak

rafthttp: log stream stopped message before closing channel
Xiang Li 9 年之前
父节点
当前提交
9a67d71e6c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rafthttp/stream.go

+ 1 - 1
rafthttp/stream.go

@@ -320,8 +320,8 @@ func (cr *streamReader) run() {
 		// overhead when retry.
 		case <-time.After(100 * time.Millisecond):
 		case <-cr.stopc:
-			close(cr.done)
 			plog.Infof("stopped streaming with peer %s (%s reader)", cr.peerID, t)
+			close(cr.done)
 			return
 		}
 	}