Commit 2229e866 authored by Max Kellermann's avatar Max Kellermann

client/Expire: cancel the BackgroundCommand before deleting it

parent f24c274f
......@@ -28,7 +28,10 @@ Client::SetExpired() noexcept
if (IsExpired())
return;
background_command.reset();
if (background_command) {
background_command->Cancel();
background_command.reset();
}
FullyBufferedSocket::Close();
timeout_event.Schedule(std::chrono::steady_clock::duration::zero());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment