mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix update peer last_action
This commit is contained in:
@@ -732,16 +732,16 @@ class TrackerRepository extends BaseRepository
|
||||
$peer->agent = $queries['user_agent'];
|
||||
$peer->updateConnectableStateIfNeeded();
|
||||
|
||||
if ($peer->exists) {
|
||||
$peer->prev_action = $peer->last_action;
|
||||
}
|
||||
|
||||
$peer->to_go = $queries['left'];
|
||||
$peer->seeder = $queries['left'] == 0 ? 'yes' : 'no';
|
||||
$peer->last_action = $nowStr;
|
||||
$peer->uploaded = $queries['uploaded'];
|
||||
$peer->downloaded = $queries['downloaded'];
|
||||
|
||||
if ($peer->exists) {
|
||||
$peer->prev_action = DB::raw('last_action');
|
||||
}
|
||||
|
||||
if ($queries['event'] == 'started' || !$peer->exists) {
|
||||
$peer->started = $nowStr;
|
||||
$peer->uploadoffset = $queries['uploaded'];
|
||||
|
||||
Reference in New Issue
Block a user