Committed by
Gerrit Code Review
Inconsistent synchronization fix for HostMonitor.timeout
Change-Id: I8b6975c65dadba93bccd951ebc309e379c5d7be1
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -168,8 +168,10 @@ public class HostMonitor implements TimerTask { | ... | @@ -168,8 +168,10 @@ public class HostMonitor implements TimerTask { |
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
171 | + synchronized (this) { | ||
171 | this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); | 172 | this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); |
172 | } | 173 | } |
174 | + } | ||
173 | 175 | ||
174 | /** | 176 | /** |
175 | * Sends an ARP or NDP request for the given IP address. | 177 | * Sends an ARP or NDP request for the given IP address. | ... | ... |
-
Please register or login to post a comment