Commit 309715641f875b8afd2078c555706d7a6b89dd99

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent c6cf1b3a

fixed race condition during unreq

... ... @@ -93,7 +93,12 @@ public class LwM2mClientContextImpl implements LwM2mClientContext {
93 93 log.debug("Fetched clients from store: {}", fetchedClients);
94 94 fetchedClients.forEach(client -> {
95 95 lwM2mClientsByEndpoint.put(client.getEndpoint(), client);
96   - updateFetchedClient(nodeId, client);
  96 + try {
  97 + client.lock();
  98 + updateFetchedClient(nodeId, client);
  99 + } finally {
  100 + client.unlock();
  101 + }
97 102 });
98 103 }
99 104
... ...