HADOOP-14354. SysInfoWindows is not thread safe. Contributed by Inigo Goiri

This commit is contained in:
Chris Douglas 2017-04-27 16:26:39 -07:00
parent 31cf480d65
commit 689fb2fc66
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ public class SysInfoWindows extends SysInfo {
return null; return null;
} }
void refreshIfNeeded() { synchronized void refreshIfNeeded() {
long now = now(); long now = now();
if (now - lastRefreshTime > REFRESH_INTERVAL_MS) { if (now - lastRefreshTime > REFRESH_INTERVAL_MS) {
long refreshInterval = now - lastRefreshTime; long refreshInterval = now - lastRefreshTime;