commit | e9d748f0f0f989bda53eb055f79d33705d8cab79 | [log] [tgz] |
---|---|---|
author | Satish K <satishk@huawei.com> | Tue Nov 24 19:05:01 2015 +0530 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue Nov 24 17:17:22 2015 +0000 |
tree | 45b9736ad3038eda0b08f896e39c6ef0a36f93b7 | |
parent | 1ca26ced9e2332daac4faf7111be0de10463940c [diff] |
Inconsistent synchronization fix for HostMonitor.timeout Change-Id: I8b6975c65dadba93bccd951ebc309e379c5d7be1
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java index 4dc93a5..5fb1dcf 100644 --- a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java +++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
@@ -168,7 +168,9 @@ } } - this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); + synchronized (this) { + this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); + } } /**