mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
ProtocolServer: Forget downloads after they are stopped
Stopping means the client no longer cares about the download, so we should just forget about it in the server.
This commit is contained in:
parent
a5ce09f8e3
commit
a34258b3d7
Notes:
sideshowbarker
2024-07-19 06:04:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a34258b3d79
1 changed files with 2 additions and 1 deletions
|
@ -26,8 +26,8 @@
|
|||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <ProtocolServer/Download.h>
|
||||
#include <ProtocolServer/ClientConnection.h>
|
||||
#include <ProtocolServer/Download.h>
|
||||
#include <ProtocolServer/Protocol.h>
|
||||
#include <ProtocolServer/ProtocolClientEndpoint.h>
|
||||
|
||||
|
@ -78,6 +78,7 @@ OwnPtr<Messages::ProtocolServer::StopDownloadResponse> ClientConnection::handle(
|
|||
bool success = false;
|
||||
if (download) {
|
||||
download->stop();
|
||||
m_downloads.remove(message.download_id());
|
||||
success = true;
|
||||
}
|
||||
return make<Messages::ProtocolServer::StopDownloadResponse>(success);
|
||||
|
|
Loading…
Add table
Reference in a new issue