mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: stop masking errMemberRemoved in pipeline
It makes logic more straightforward and readable. Also, it makes the handle method consistent with stream and snapshot sender.
This commit is contained in:
parent
908a011604
commit
84d7825a77
@ -159,7 +159,6 @@ func (p *pipeline) post(data []byte) (err error) {
|
||||
// always be stopped. So we use reportCriticalError to report it to errorc.
|
||||
if err == errMemberRemoved {
|
||||
reportCriticalError(err, p.errorc)
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ func TestTransportUpdate(t *testing.T) {
|
||||
func TestTransportErrorc(t *testing.T) {
|
||||
errorc := make(chan error, 1)
|
||||
tr := &Transport{
|
||||
Raft: &fakeRaft{},
|
||||
LeaderStats: stats.NewLeaderStats(""),
|
||||
ErrorC: errorc,
|
||||
streamRt: newRespRoundTripper(http.StatusForbidden, nil),
|
||||
|
Loading…
x
Reference in New Issue
Block a user