Merge pull request #7402 from heyitsanthony/fix-watchconnerr
grpcproxy: return closing error when stream is canceled from conn closerelease-3.2
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…
Reference in New Issue