@@ -94,10 +94,8 @@ func StreamClientInterceptor(optFuncs ...CallOption) grpc.StreamClientIntercepto
94
94
if err := waitRetryBackoff (attempt , parentCtx , callOpts ); err != nil {
95
95
return nil , err
96
96
}
97
- callCtx , cancel := perCallContext (parentCtx , callOpts , 0 )
98
- defer cancel () // Clean up potential resources.
99
97
var newStreamer grpc.ClientStream
100
- newStreamer , lastErr = streamer (callCtx , desc , cc , method , grpcOpts ... )
98
+ newStreamer , lastErr = streamer (parentCtx , desc , cc , method , grpcOpts ... )
101
99
if lastErr == nil {
102
100
retryingStreamer := & serverStreamingRetryingStream {
103
101
ClientStream : newStreamer ,
@@ -188,9 +186,7 @@ func (s *serverStreamingRetryingStream) RecvMsg(m any) error {
188
186
return err
189
187
}
190
188
s .callOpts .onRetryCallback (s .parentCtx , attempt , lastErr )
191
- // TODO(bwplotka): Close cancel as it might leak some resources.
192
- callCtx , _ := perCallContext (s .parentCtx , s .callOpts , attempt ) //nolint
193
- newStream , err := s .reestablishStreamAndResendBuffer (callCtx )
189
+ newStream , err := s .reestablishStreamAndResendBuffer (s .parentCtx )
194
190
if err != nil {
195
191
// Retry dial and transport errors of establishing stream as grpc doesn't retry.
196
192
if isRetriable (err , s .callOpts ) {
0 commit comments