mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-19 00:01:00 +08:00
fix snatch time field not increase
This commit is contained in:
@@ -135,8 +135,8 @@ class Test extends Command
|
||||
// $model = \App\Models\TorrentSecret::query()->where('id', 1)->first();
|
||||
// \Nexus\Database\NexusDB::cache_put($key, $model);
|
||||
|
||||
$r = User::query()->first();
|
||||
dd($r->donoruntil);
|
||||
$peer = new Peer(['last_action' => '2022-04-08 22:20:14']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -85,11 +85,16 @@ class TrackerRepository extends BaseRepository
|
||||
$this->checkCheater($torrent, $dataTraffic, $user, $peerSelf);
|
||||
}
|
||||
|
||||
$this->updatePeer($peerSelf, $queries);
|
||||
/**
|
||||
* Note: Must update snatch first, otherwise peer last_action already change
|
||||
*/
|
||||
$snatch = $this->updateSnatch($peerSelf, $queries, $dataTraffic);
|
||||
if ($queries['event'] == 'completed') {
|
||||
$this->handleHitAndRun($user, $torrent, $snatch);
|
||||
}
|
||||
|
||||
$this->updatePeer($peerSelf, $queries);
|
||||
|
||||
$this->updateTorrent($torrent, $queries);
|
||||
|
||||
if ($dataTraffic['uploaded_increment_for_user'] > 0) {
|
||||
|
||||
Reference in New Issue
Block a user