fix for mastership race condition on 1.0 branch
Change-Id: I213b292c283ddf3082cdfbd2f37cb5c34791e5a1
Showing
1 changed file
with
5 additions
and
1 deletions
| ... | @@ -614,7 +614,11 @@ public class DeviceManager | ... | @@ -614,7 +614,11 @@ public class DeviceManager |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | // device is connected to this node: | 616 | // device is connected to this node: |
| 617 | - reassertRole(did, myNextRole); | 617 | + if (store.getDevice(did) != null) { |
| 618 | + reassertRole(did, myNextRole); | ||
| 619 | + } else { | ||
| 620 | + log.warn("Device is not yet/no longer in the store: {}", did); | ||
| 621 | + } | ||
| 618 | } | 622 | } |
| 619 | } | 623 | } |
| 620 | 624 | ... | ... |
-
Please register or login to post a comment