Compare commits

..

3 Commits

Author SHA1 Message Date
c2516a2b54 Change where processed packets are placed, if fido.packet_keep is true
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2024-05-12 20:50:19 +10:00
171392cf40 Fix for session being reported negative 2024-05-12 20:46:00 +10:00
64d37741a5 Fix when dispatching packets, and our address object has many relations already loaded, causing memory exhaustion due to recursion 2024-05-12 20:45:41 +10:00
3 changed files with 4 additions and 4 deletions

View File

@ -128,10 +128,10 @@ class Receive extends Base
// If packet is greater than a size, lets queue it
if ($this->queue || ($this->receiving->size > config('fido.queue_size',0))) {
Log::info(sprintf('%s:- Packet [%s] will be sent to the queue for processing because its [%d] size, or queue forced',self::LOGKEY,$this->receiving->full_name,$this->receiving->size));
PacketProcess::dispatch($this->receiving,$this->ao,$rcvd_time);
PacketProcess::dispatch($this->receiving,$this->ao->withoutRelations(),$rcvd_time);
} else
PacketProcess::dispatchSync($this->receiving,$this->ao,$rcvd_time);
PacketProcess::dispatchSync($this->receiving,$this->ao->withoutRelations(),$rcvd_time);
} catch (\Exception $e) {
Log::error(sprintf('%s:! Got error dispatching packet [%s] (%d:%s-%s).',self::LOGKEY,$this->receiving->full_name,$e->getLine(),$e->getFile(),$e->getMessage()));

View File

@ -92,7 +92,7 @@ class Node
// Return how long our session has been connected
case 'session_time':
return sprintf("%d",Carbon::now()->diffInSeconds($this->start_time));
return sprintf("%d",$this->start_time->diffInSeconds(Carbon::now()));
case 'system':
case 'sysop':

View File

@ -132,7 +132,7 @@ class PacketProcess implements ShouldQueue
} else {
// If we want to keep the packet, we could do that logic here
if (config('fido.packet_keep')) {
$dir = sprintf('%s/%s',config('fido.dir'),Carbon::now()->format('Ymd'));
$dir = sprintf('%s/%d/%d/%d',config('fido.dir'),($x=Carbon::now())->format('Y'),$x->format('m'),$x->format('d'));
Log::debug(sprintf('%s:- Moving processed packet [%s] to [%s]',self::LOGKEY,$this->file->rel_name,$dir));
try {