You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scenario when the response of an HTTP request is not consumed by the user, HTTPClient should dispose the underlying connection and not reuse it again for any other request.
Failure to do this will result in a subsequent request getting an older response (if arrived). If the older response never arrives, then the new request qualifies as a pipeline request and hence the response will never come (as the responses should be ordered and the first one never completed)
Currently for read timeouts, we do dispose the connections but the same is not done for user initiated unsubscribes prior to response completion.
Streaming responses
How does this play with streaming responses?
For endless streams (eg: SSE) we should discard the connection, for protocols where the stream end may be well defined (Websockets) we should try to end the stream on unsubscribe.
The text was updated successfully, but these errors were encountered:
This was fixed as part of issue #250 for disposing connections if returned to pool (on unsubscribe) before response is completed. Issue #223 fixed this for SSE where the connections receiving are never reused.
The scenario when the response of an HTTP request is not consumed by the user, HTTPClient should dispose the underlying connection and not reuse it again for any other request.
Failure to do this will result in a subsequent request getting an older response (if arrived). If the older response never arrives, then the new request qualifies as a pipeline request and hence the response will never come (as the responses should be ordered and the first one never completed)
The following code demonstrates this problem:
Currently for read timeouts, we do dispose the connections but the same is not done for user initiated unsubscribes prior to response completion.
Streaming responses
How does this play with streaming responses?
For endless streams (eg: SSE) we should discard the connection, for protocols where the stream end may be well defined (Websockets) we should try to end the stream on unsubscribe.
The text was updated successfully, but these errors were encountered: