small optimization
This commit is contained in:
parent
cc703e5091
commit
5b67dde4e4
1 changed files with 2 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ public class NetScanController implements HalEventController, HalAutoScannableCo
|
|||
// We ping two times to increase reliability
|
||||
boolean ping = false;
|
||||
ping |= InetScanner.isReachable(device.getHost(), executor);
|
||||
ping |= InetScanner.isReachable(device.getHost(), executor);
|
||||
if (!ping)
|
||||
ping |= InetScanner.isReachable(device.getHost(), executor);
|
||||
|
||||
// Should we report?
|
||||
if (prevData == null || prevData.isOn() != ping) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue