Committed by
Gerrit Code Review
Inconsistent synchronization fix for HostMonitor.timeout
Change-Id: I8b6975c65dadba93bccd951ebc309e379c5d7be1
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -168,7 +168,9 @@ public class HostMonitor implements TimerTask { | ... | @@ -168,7 +168,9 @@ public class HostMonitor implements TimerTask { |
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
171 | - this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); | 171 | + synchronized (this) { |
172 | + this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS); | ||
173 | + } | ||
172 | } | 174 | } |
173 | 175 | ||
174 | /** | 176 | /** | ... | ... |
-
Please register or login to post a comment