ソースを参照

rafthttp: report error to correct chan

Xiang Li 10 年 前
コミット
5183631f17
1 ファイル変更1 行追加1 行削除
  1. 1 1
      rafthttp/stream.go

+ 1 - 1
rafthttp/stream.go

@@ -279,7 +279,7 @@ type streamReader struct {
 func (r *streamReader) start() {
 func (r *streamReader) start() {
 	r.stopc = make(chan struct{})
 	r.stopc = make(chan struct{})
 	r.done = make(chan struct{})
 	r.done = make(chan struct{})
-	if r.errorc != nil {
+	if r.errorc == nil {
 		r.errorc = r.tr.ErrorC
 		r.errorc = r.tr.ErrorC
 	}
 	}