mirror of https://github.com/grpc/grpc-go.git
stream: never return errors from CloseSend (#2312)
This commit is contained in:
parent
be59908d40
commit
8ce7e6babb
|
@ -660,7 +660,14 @@ func (cs *clientStream) CloseSend() error {
|
|||
return nil
|
||||
}
|
||||
cs.sentLast = true
|
||||
op := func(a *csAttempt) error { return a.t.Write(a.s, nil, nil, &transport.Options{Last: true}) }
|
||||
op := func(a *csAttempt) error {
|
||||
a.t.Write(a.s, nil, nil, &transport.Options{Last: true})
|
||||
// Always return nil; io.EOF is the only error that might make sense
|
||||
// instead, but there is no need to signal the client to call RecvMsg
|
||||
// as the only use left for the stream after CloseSend is to call
|
||||
// RecvMsg. This also matches historical behavior.
|
||||
return nil
|
||||
}
|
||||
cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) })
|
||||
// We never returned an error here for reasons.
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue