Commit dfd0d2685b01798dbf2170d060808ce55f301e78

Authored by Andrii Shvaika
1 parent 7b3d903c

Fix issue with locks

... ... @@ -50,9 +50,9 @@ public class DefaultTbDeviceProfileCache implements TbDeviceProfileCache {
50 50 public DeviceProfile get(TenantId tenantId, DeviceProfileId deviceProfileId) {
51 51 DeviceProfile profile = deviceProfilesMap.get(deviceProfileId);
52 52 if (profile == null) {
53   - deviceProfileFetchLock.lock();
54 53 profile = deviceProfilesMap.get(deviceProfileId);
55 54 if (profile == null) {
  55 + deviceProfileFetchLock.lock();
56 56 try {
57 57 profile = deviceProfileService.findDeviceProfileById(tenantId, deviceProfileId);
58 58 if (profile != null) {
... ...