mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Use QDeadlineTimer for tracking WebUI banned duration
It simplifies our code and the new timer is monotonic.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDeadlineTimer>
|
||||
#include <QHash>
|
||||
|
||||
#include "apicontroller.h"
|
||||
@@ -54,7 +55,7 @@ private:
|
||||
struct FailedLogin
|
||||
{
|
||||
int failedAttemptsCount = 0;
|
||||
qint64 bannedAt = 0;
|
||||
QDeadlineTimer banTimer {-1};
|
||||
};
|
||||
mutable QHash<QString, FailedLogin> m_clientFailedLogins;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user