Parcourir la source

rafthttp: report error to correct chan

Xiang Li il y a 10 ans
Parent
commit
5183631f17
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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
 	}