RequestServer: Fix assertion on exit when curl had pending timeouts
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run

If we already destroyed our timer during destruction, and then curl
tries to flush its timeouts when we tear down the multi, we can just
ignore the timer callbacks.
This commit is contained in:
Andreas Kling 2024-09-19 11:22:43 +02:00 committed by Andreas Kling
parent 3e6448efcf
commit 3ef0fc89b3
Notes: github-actions[bot] 2024-09-19 09:46:06 +00:00

View file

@ -163,6 +163,8 @@ int ConnectionFromClient::on_socket_callback(CURL*, int sockfd, int what, void*
int ConnectionFromClient::on_timeout_callback(void*, long timeout_ms, void* user_data) int ConnectionFromClient::on_timeout_callback(void*, long timeout_ms, void* user_data)
{ {
auto* client = static_cast<ConnectionFromClient*>(user_data); auto* client = static_cast<ConnectionFromClient*>(user_data);
if (!client->m_timer)
return 0;
if (timeout_ms < 0) { if (timeout_ms < 0) {
client->m_timer->stop(); client->m_timer->stop();
} else { } else {