fix: [#6683] Timeout issue when using DLASE #6696
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6683
Description
This PR fixes an issue where, while using DLASE, the bot threw a timeout issue while streaming, due to not generating a response in the initial request.
Therefore, if the streaming process in the initial request takes longer than 15 seconds to finalize and generate a response, the bot will throw a timeout issue.
Sending a response (
HTTP 202 (Accepted)
) before starting to process all streaming requests addressed the issue and will not generate a timeout issue.Specific Changes
SendResponseAsync
call to theStreamingSession
class to send an HTTP 202 (Accepted) response before starting processing all streaming information.Accepted
StatusCode condition toProtocolAdapter
for Streaming andStreamingSession
for Connector.Streaming. This allows to detect when the Accepted response is taking place and can proceed to ignore the response and let the actual OK response to be used after streaming.Testing
The following image shows the timeout issue before and after the fix.