-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CAPL-264] Ensure a default timeout is provided for all outgoing requests #15644
Conversation
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
e191d14
to
86b3343
Compare
86b3343
to
827b0d0
Compare
// TODO: handle retries | ||
func (c *OutgoingConnectorHandler) HandleSingleNodeRequest(ctx context.Context, messageID string, req capabilities.Request) (*api.Message, error) { | ||
// set default timeout if not provided for all outgoing requests | ||
if req.TimeoutMs == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agparadiso I know I didn't ask you to do this originally, but could we also create a subcontext with this timeout plus some margin added to it?
Atm we don't get a response from the gateway if we time out which causes some small bugs; if we add this, the context would fire on line 101 and we'd at least get a response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added 👍🏼
…ests (#15644) * fix: ensure a default timeout is provided for all outgoing requests * chore: add a subcontext with a timeout + margin * fix: lint
Description
This pr changes the way we handle timeouts for the outgoing connector handler adding a default timeout if one is not specified.
CAPL-264
Requires
Supports