mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: only close streamMsgApp when updating term
In all stream types, streamMsgApp needs to be closed when updating term because its stream connection can only be used under a certain term. But there is no need to close other streams, which may waste time and reduce performance.
This commit is contained in:
parent
9699a501f3
commit
8637a4bf69
@ -324,7 +324,9 @@ func (cr *streamReader) updateMsgAppTerm(term uint64) {
|
||||
return
|
||||
}
|
||||
cr.msgAppTerm = term
|
||||
cr.close()
|
||||
if cr.t == streamTypeMsgApp {
|
||||
cr.close()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: always cancel in-flight dial and decode
|
||||
|
Loading…
x
Reference in New Issue
Block a user