Do not update device IP when DNS resolution fails (#15499)

This commit is contained in:
Tony Murray
2023-10-23 20:09:55 -05:00
committed by GitHub
parent 8c38d3336e
commit 98992345fa

View File

@@ -251,7 +251,7 @@ class Poller
{
\DeviceCache::setPrimary($device_id);
$this->device = \DeviceCache::getPrimary();
$this->device->ip = $this->device->overwrite_ip ?: Dns::lookupIp($this->device);
$this->device->ip = $this->device->overwrite_ip ?: Dns::lookupIp($this->device) ?: $this->device->ip;
$this->deviceArray = $this->device->toArray();
if ($os_group = Config::get("os.{$this->device->os}.group")) {