diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2020-05-16 05:36:40 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-17 12:41:38 +0200 |
commit | f2621f37a4ce024a49e41755ea12d826e991fc1a (patch) | |
tree | 8d4648908e63e69e42a58c7dcc127c1b5bb9f4a0 /Services/ProtocolServer/HttpsDownload.h | |
parent | 184ee8ac77457e7e5bae07a3cb48f872e2063871 (diff) | |
download | serenity-f2621f37a4ce024a49e41755ea12d826e991fc1a.zip |
ProtocolServer: Attach downloads and their lifecycles to clients
Previously a download lived independently of the client connection it came
from. This was the source of several undesirable behaviours, including the
potential for clients to influence downloads they didn't start, and
downloads living longer than their associated client connections. Now we
attach downloads to client connections, which means they're cleaned up
automatically when the client goes away, and there's significantly less
risk of clients interfering with each other.
Diffstat (limited to 'Services/ProtocolServer/HttpsDownload.h')
-rw-r--r-- | Services/ProtocolServer/HttpsDownload.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Services/ProtocolServer/HttpsDownload.h b/Services/ProtocolServer/HttpsDownload.h index a6c75bc4d7..8a5b6aceb2 100644 --- a/Services/ProtocolServer/HttpsDownload.h +++ b/Services/ProtocolServer/HttpsDownload.h @@ -36,10 +36,10 @@ class HttpsProtocol; class HttpsDownload final : public Download { public: virtual ~HttpsDownload() override; - static NonnullRefPtr<HttpsDownload> create_with_job(Badge<HttpsProtocol>, PSClientConnection&, NonnullRefPtr<HTTP::HttpsJob>&&); + static NonnullOwnPtr<HttpsDownload> create_with_job(Badge<HttpsProtocol>, PSClientConnection&, NonnullRefPtr<HTTP::HttpsJob>); private: - explicit HttpsDownload(PSClientConnection&, NonnullRefPtr<HTTP::HttpsJob>&&); + explicit HttpsDownload(PSClientConnection&, NonnullRefPtr<HTTP::HttpsJob>); NonnullRefPtr<HTTP::HttpsJob> m_job; }; |