mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
Update capabilities after client update
This commit is contained in:
parent
11cd5be490
commit
dcb54251ef
@ -90,7 +90,7 @@ BackupServerGet::BackupServerGet(IPipe *pPipe, sockaddr_in pAddr, const std::wst
|
||||
: internet_connection(internet_connection), server_settings(NULL), client_throttler(NULL),
|
||||
use_snapshots(use_snapshots), use_reflink(use_reflink), local_hash(NULL), bsh(NULL),
|
||||
bsh_ticket(ILLEGAL_THREADPOOL_TICKET), bsh_prepare(NULL), bsh_prepare_ticket(ILLEGAL_THREADPOOL_TICKET),
|
||||
backup_dao(NULL)
|
||||
backup_dao(NULL), client_updated_time(0)
|
||||
{
|
||||
q_update_lastseen=NULL;
|
||||
pipe=pPipe;
|
||||
@ -556,6 +556,12 @@ void BackupServerGet::operator ()(void)
|
||||
}
|
||||
}
|
||||
|
||||
if(client_updated_time!=0 && Server->getTimeSeconds()-client_updated_time>5*60)
|
||||
{
|
||||
updateCapabilities();
|
||||
client_updated_time=0;
|
||||
}
|
||||
|
||||
update_sql_intervals(true);
|
||||
|
||||
int64 ttime=Server->getTimeMS();
|
||||
@ -4313,6 +4319,8 @@ void BackupServerGet::checkClientVersion(void)
|
||||
|
||||
Server->destroy(cc);
|
||||
|
||||
client_updated_time = Server->getTimeSeconds();
|
||||
|
||||
if(ok)
|
||||
{
|
||||
ServerLogger::Log(clientid, L"Updated client successfully", LL_INFO);
|
||||
|
||||
@ -318,4 +318,6 @@ private:
|
||||
|
||||
IMutex* hash_existing_mutex;
|
||||
std::vector<ServerBackupDao::SFileEntry> hash_existing;
|
||||
|
||||
int64 client_updated_time;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user