use very coarse timers for network timeout

seems to work around some timers expiring too early

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2024-08-09 15:00:18 +02:00 committed by Matthieu Gallien
parent e5c6e792d7
commit 0fc61581bf

View file

@ -57,6 +57,7 @@ AbstractNetworkJob::AbstractNetworkJob(const AccountPtr &account, const QString
ASSERT(account != parent);
_timer.setSingleShot(true);
_timer.setTimerType(Qt::VeryCoarseTimer);
_timer.setInterval((httpTimeout ? httpTimeout : 300) * 1000); // default to 5 minutes.
connect(&_timer, &QTimer::timeout, this, &AbstractNetworkJob::slotTimeout);