Skip to content

Commit

Permalink
RequestServer: Fix assertion on exit when curl had pending timeouts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
awesomekling committed Sep 19, 2024
1 parent 3e6448e commit 3ef0fc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Userland/Services/RequestServer/ConnectionFromClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
auto* client = static_cast<ConnectionFromClient*>(user_data);
if (!client->m_timer)
return 0;
if (timeout_ms < 0) {
client->m_timer->stop();
} else {
Expand Down

0 comments on commit 3ef0fc8

Please sign in to comment.