bugfix
This commit is contained in:
parent
23f0645581
commit
45eabe2845
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ public class NetScanController implements HalEventController, HalAutoScannableCo
|
||||||
for (Map.Entry<LocalNetworkDevice,SwitchEventData> entry : devices.entrySet()) {
|
for (Map.Entry<LocalNetworkDevice,SwitchEventData> entry : devices.entrySet()) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
boolean online = InetScanner.isReachable(entry.getKey().getHost(), executor);
|
boolean online = InetScanner.isReachable(entry.getKey().getHost(), executor);
|
||||||
if (entry.getValue() == null || entry.getValue().isOn() == online) {
|
if (entry.getValue() == null || entry.getValue().isOn() != online) {
|
||||||
entry.setValue(
|
entry.setValue(
|
||||||
new SwitchEventData(online, System.currentTimeMillis()));
|
new SwitchEventData(online, System.currentTimeMillis()));
|
||||||
logger.fine("IP "+entry.getKey().getHost() +" state has changed to "+ entry.getValue());
|
logger.fine("IP "+entry.getKey().getHost() +" state has changed to "+ entry.getValue());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue