Browse Source

rafthttp: report error to correct chan

Xiang Li 9 năm trước cách đây
mục cha
commit
5183631f17
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      rafthttp/stream.go

+ 1 - 1
rafthttp/stream.go

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