Skip to content

Commit

Permalink
Fixes unclosed chan
Browse files Browse the repository at this point in the history
  • Loading branch information
nkcr committed Mar 23, 2021
1 parent 44bcfec commit a4a6c63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,19 @@ func (p *ServiceProcessor) ProcessClientStreamRequest(req *http.Request, path st
network.DefaultConstructors(p.Context.server.Suite()))
if err != nil {
log.Error(xerrors.Errorf("failed to decode message: %v", err))
close(outChan)
return
}

reply, stopServiceChan, err := callInterfaceFunc(mh.handler, msg, mh.streaming)
if err != nil {
log.Error(err)

if stopServiceChan != nil {
close(stopServiceChan)
}

close(outChan)
return
}

Expand Down

0 comments on commit a4a6c63

Please sign in to comment.