Skip to content

Commit

Permalink
Merge pull request #2242 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
prevent hanging dispatch
  • Loading branch information
ucwong authored Jan 7, 2025
2 parents e99e2e0 + c819b39 commit fb580f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ctxc/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ func (p *peer) dispatchResponse(res *Response, metadata func() any) error {
return <-res.Done // Response delivered, return any errors
case <-res.Req.cancel:
return nil // Request cancelled, silently discard response
case <-p.term:
return errDisconnected
}
}

Expand Down

0 comments on commit fb580f5

Please sign in to comment.