From 5ed546041aa6016f9bc6f5e11a1f34533df42f62 Mon Sep 17 00:00:00 2001 From: saturneric Date: Thu, 24 Sep 2026 19:49:19 +0200 Subject: fix(sync): time out key uploads - set a 15-second transfer timeout for upload requests - prevent waiting events from hanging when uploads receive no response --- src/m_key_server_sync/PKSInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/m_key_server_sync/PKSInterface.cpp b/src/m_key_server_sync/PKSInterface.cpp index 1ad8fb3..9963776 100644 --- a/src/m_key_server_sync/PKSInterface.cpp +++ b/src/m_key_server_sync/PKSInterface.cpp @@ -283,6 +283,9 @@ void PKSInterface::UploadKey(const QString& url, const QByteArray& key_data) { GFAppUserAgent(GFModuleSdkContext())); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); + // Like every other request here: an upload that never answers would leave + // the event that asked for it waiting for ever. + request.setTransferTimeout(15000); post_data.append("keytext").append("=").append(data); -- cgit