Skip to content
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

Fix not sending fault response when Endpoint TO #2151

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

malakaganga
Copy link
Contributor

@malakaganga malakaganga commented Feb 23, 2024

Purpose

While reading the request if an endpoint time-out happens the fault sequence response is not written to the back end. The reason for this is the thread is remaining actively in the SourceHandler inputReady method while reading requests when timeout happens so it would never hit the responseReady method until the thread is released. So I achieved that by suspending the input when timeout happens.
Also, an important aspect here is that this is an error scenario since we haven't read the input completely and hence haven't sent request data completely as well.
Hence we need to avoid returning the buffers to the buffer factory as well.

Fixes: wso2/api-manager#2499

While reading the request if a endpoint time out happens the fault
sequence response is not written to the back end. The reason for this is
the thread is remaining actively in SourceHandler inputReady method
while reading request when timeout happens so it would never hit
responseReady method until the thread is released. So I achieved that by
suspending the input when timeout happens.

Also important aspect here is that this is a error scenario since we
haven't read input completely hence haven't sent request data completely
hence we need to avoid returning the buffers to the buffer factory as
well.

Fixes: wso2/api-manager#2499

imp2
@malakaganga malakaganga merged commit ed2c11f into wso2:master Feb 26, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants