File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1196,7 +1196,9 @@ func (s *bidiReadStreamSession) sendLoop() {
11961196 }
11971197 if err := s .stream .Send (req ); err != nil {
11981198 s .setError (err )
1199- s .cancel ()
1199+ if err != io .EOF {
1200+ s .cancel ()
1201+ }
12001202 return
12011203 }
12021204 case <- s .ctx .Done ():
@@ -1244,6 +1246,7 @@ func (s *bidiReadStreamSession) receiveLoop() {
12441246 return
12451247 }
12461248 if s .managerCtx .Err () != nil {
1249+ databufs .Free ()
12471250 return
12481251 }
12491252 select {
@@ -1264,12 +1267,14 @@ func (s *bidiReadStreamSession) receiveLoop() {
12641267 // to make sure we do not send on a closed respC channel
12651268 // during normal MRD close.
12661269 if s .managerCtx .Err () != nil {
1270+ databufs .Free ()
12671271 return
12681272 }
12691273 select {
12701274 case s .respC <- mrdSessionResult {id : s .id , session : s , err : err }:
12711275 case <- s .managerCtx .Done ():
12721276 }
1277+ databufs .Free ()
12731278 return
12741279 }
12751280 }
You can’t perform that action at this time.
0 commit comments