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

feat(http): Add ability to abort a request #56

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

mathieucarbou
Copy link
Member

@mathieucarbou mathieucarbou commented Feb 4, 2025

This PR allows the user to abort a request.

Tested that with autocannon, 16 or 48 // workerrs, works fine.

The idea is to provide the capability to the user (and us also) to reset the connection in case something has to be stopped now, i.e. bad allocation.

Currently, the use had to do: request->client()->abort() which is wrong because out of the scope of the request object (_sent and _paused flags should be correctly handled)

@mathieucarbou mathieucarbou self-assigned this Feb 4, 2025
@mathieucarbou mathieucarbou requested a review from a team February 4, 2025 13:14
@mathieucarbou mathieucarbou marked this pull request as draft February 4, 2025 13:14
@mathieucarbou mathieucarbou marked this pull request as ready for review February 4, 2025 13:24
@mathieucarbou mathieucarbou merged commit 3b6d29b into main Feb 4, 2025
22 checks passed
@mathieucarbou mathieucarbou deleted the feat/abort branch February 4, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants