Skip to content

Commit

Permalink
Make auto-refresh methods synchronized
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Schofield <[email protected]> (github: andrew-schofield)
  • Loading branch information
andrew-schofield committed Feb 6, 2018
1 parent f09079e commit 75725d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void dispose() {
}
}

private void startAutomaticRefresh() {
private synchronized void startAutomaticRefresh() {
Bridge bridge = getBridge();
if (bridge != null) {
refreshJob = scheduler.scheduleWithFixedDelay(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void initialize() {
refresh();
}

private void startAutomaticRefresh() {
private synchronized void startAutomaticRefresh() {
Thing thing = getThing();
if (thing != null) {
refreshJob = scheduler.scheduleWithFixedDelay(() -> {
Expand Down

0 comments on commit 75725d1

Please sign in to comment.