Added file transfer status

This commit is contained in:
WolverinDEV
2020-05-13 18:03:14 +02:00
parent 1a3235697e
commit b987583770
11 changed files with 225 additions and 81 deletions
-14
View File
@@ -209,20 +209,6 @@ void VirtualServer::executeServerTick() {
BEGIN_TIMINGS();
this->serverStatistics->tick();
if(fileStatisticsTimestamp + seconds(5) < system_clock::now()) {
fileStatisticsTimestamp = system_clock::now();
auto update = this->serverStatistics->mark_file_bytes();
if(update.first > 0) {
this->properties()[property::VIRTUALSERVER_MONTH_BYTES_DOWNLOADED] += update.first;
this->properties()[property::VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED] += update.first;
}
if(update.second > 0) {
this->properties()[property::VIRTUALSERVER_MONTH_BYTES_UPLOADED] += update.second;
this->properties()[property::VIRTUALSERVER_TOTAL_BYTES_UPLOADED] += update.second;
}
}
{
lock_guard<threads::Mutex> lock(this->join_attempts_lock);
if(system_clock::now() > this->join_last_decrease + seconds(5)) {