Fix for EMSI aborting with $rc undefined, Fix for idle nodes updates failing on updated_at column and change text used when nodes have never polled

This commit is contained in:
2025-01-29 08:45:46 +11:00
parent 35c5b3da8d
commit 8cc561ea2b
4 changed files with 28 additions and 16 deletions

View File

@@ -929,6 +929,8 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
} catch (SocketException $e) {
if ($c++ > 2)
return self::TIMEOUT;
else
$ch = -2;
}
if (static::DEBUG)

View File

@@ -489,7 +489,7 @@ final class Zmodem extends Protocol implements CRCInterface,ZmodemInterface
* @param Send $send
* @return int
*/
public function zmodem_sendfile(Send $send,Node $node): int
public function zmodem_sendfile(Send $send,Node $node): void
{
Log::debug(sprintf('%s:+ zmodem_sendfile',self::LOGKEY));
@@ -513,16 +513,16 @@ final class Zmodem extends Protocol implements CRCInterface,ZmodemInterface
break;
}
return $rc;
return;
} catch (\Exception $e) {
Log::error(sprintf('%s:! Error [%s]',self::LOGKEY,$e->getMessage()),['rc'=>$rc]);
Log::error(sprintf('%s:! Error [%s]',self::LOGKEY,$e->getMessage()),['rc'=>$rc ?? '-UNDEFINED-']);
return $rc;
return;
}
}
return self::OK;
return;
}
/**