You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid calling setState() anynchronously (see mcm1957's post) - use await setState()
1a. in onReady() - done
1b. in other occurences all over main.js - no change: await is only allowed at top level or in async functions
Clarify meaning of setObjectNotExists() vs setObjectNotExistsAsync() and use it consitently
2a. in onReady() - done: initialization in onReady should use await setObjectNotExistsAsync(); see adapterdev
2b. in other occurences all over main.js - no change: in storeValue(), use synchronous setObjectNotExists() with callback
how-to-async.md by AlCalzone is a good (German) intro to (a)synchronicity in js.
Ad 1b.
I tried to use async and await for all setState() occurences, but this leads to timing issues: the adapter keeps retrying to build up the connection. I.e. somehow await does not synchronize how I would expect.
Describe the bug
This was initially reported by Sentry and then falsely addressed to ioBroker.js-controller
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All adapter operations should be safely terminated before adapter shuts down.
Screenshots & Logfiles
See ioBroker.js-controller
Versions:
The text was updated successfully, but these errors were encountered: