Skip to content

Conversation

@Anohkka
Copy link
Contributor

@Anohkka Anohkka commented Sep 1, 2025

Fixes for #1047 and #1186. I took the liberty of changing cpr::Multiperform code to use structured bindings for better readability as well, but I can just revert that commit if so desired.

@Anohkka Anohkka changed the title cpr::Multiperform fixes - #1047 and #1186 cpr::MultiPerform fixes - #1047 and #1186 Sep 1, 2025
This curl_multi_remove_handle call is a bit more error-prone with the
changes we've made, and skipping over sessions in the cleanup process
leads to sessions that can't be used due to isUsedInMultiPerform being
set to true, along with other potential, undesired consequences as a
result of improper cleanup.

We could remove the curl_multi_remove_handle call entirely, but that,
too, will cause issues if any part of the code throws after we've added
handles to the multi stack and before removing them.

It's not something that's very likely to happen with the existing code,
but that could easily change in the future and the call to that function
doesn't seem to be doing any harm, aside from some wasted CPU cycles.
@COM8 COM8 added the Bug 🐛 label Sep 20, 2025
Copy link
Member

@COM8 COM8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful! Thank you very much for fixing this.

@COM8 COM8 linked an issue Sep 20, 2025 that may be closed by this pull request
@COM8 COM8 merged commit 85917bc into libcpr:master Sep 20, 2025
33 of 36 checks passed
@COM8 COM8 modified the milestones: CPR 1.12.0, CPR 1.13.0 Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cpr::Multiperform Assignment Not Working

2 participants