mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: log stream stopped message before closing channel
Was causing spurious goroutine leak failures in testing.
This commit is contained in:
parent
aa6b1e6a10
commit
0250f0c984
@ -320,8 +320,8 @@ func (cr *streamReader) run() {
|
|||||||
// overhead when retry.
|
// overhead when retry.
|
||||||
case <-time.After(100 * time.Millisecond):
|
case <-time.After(100 * time.Millisecond):
|
||||||
case <-cr.stopc:
|
case <-cr.stopc:
|
||||||
close(cr.done)
|
|
||||||
plog.Infof("stopped streaming with peer %s (%s reader)", cr.peerID, t)
|
plog.Infof("stopped streaming with peer %s (%s reader)", cr.peerID, t)
|
||||||
|
close(cr.done)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user