mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #7402 from heyitsanthony/fix-watchconnerr
grpcproxy: return closing error when stream is canceled from conn close
This commit is contained in:
commit
2eb8243d94
@ -73,7 +73,12 @@ func (wp *watchProxy) Watch(stream pb.Watch_WatchServer) (err error) {
|
||||
select {
|
||||
case <-wp.ctx.Done():
|
||||
wp.mu.Unlock()
|
||||
return
|
||||
select {
|
||||
case <-wp.leader.disconnectNotify():
|
||||
return grpc.ErrClientConnClosing
|
||||
default:
|
||||
return wp.ctx.Err()
|
||||
}
|
||||
default:
|
||||
wp.wg.Add(1)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user