Skip to content

Commit

Permalink
C4CurlSystem: Fix crash on cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgen301 committed Aug 8, 2023
1 parent 1afafc7 commit 48343e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/C4CurlSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class C4CurlSystem
auto &that = *reinterpret_cast<Awaiter *>(argument);
{
const std::lock_guard lock{that.resultMutex};
that.system.RemoveHandle(std::visit([](const auto &handle) { return handle.get(); }, that.easyHandle));
that.easyHandle = {};
that.cancelled.store(true, std::memory_order_release);
}
that.Resume();
Expand Down

0 comments on commit 48343e3

Please sign in to comment.