mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 06:07:57 +00:00
Merge pull request #421 from resin-io/420-memoize-then
Issue #420: Avoid supervisor crash without connection by properly memoizing promise-returning functions
This commit is contained in:
commit
1dda2a5810
@ -13,7 +13,8 @@ bootstrap = require './bootstrap'
|
||||
{ checkTruthy } = require './lib/validation'
|
||||
osRelease = require './lib/os-release'
|
||||
|
||||
memoizePromise = _.partial(memoizee, _, promise: true)
|
||||
# If we don't use promise: 'then', exceptions will crash the program
|
||||
memoizePromise = _.partial(memoizee, _, promise: 'then')
|
||||
|
||||
|
||||
exports.getID = memoizePromise ->
|
||||
|
Loading…
Reference in New Issue
Block a user