fix announce check upload speed

This commit is contained in:
xiaomlove
2022-07-30 15:54:32 +08:00
parent bb585ec631
commit 60326b2bbd
2 changed files with 12 additions and 8 deletions
+3
View File
@@ -586,6 +586,9 @@ class TrackerRepository extends BaseRepository
return;
}
$duration = Carbon::now()->diffInSeconds($peer->last_action);
if ($duration <= 0) {
return;
}
$upSpeedMbps = number_format(($dataTraffic['uploaded_increment'] / $duration / 1024 / 1024) * 8);
$notSeedBoxMaxSpeedMbps = Setting::get('seed_box.not_seed_box_max_speed');
do_log("upSpeedMbps: $upSpeedMbps, notSeedBoxMaxSpeedMbps: $notSeedBoxMaxSpeedMbps");