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:
Pablo Carranza Vélez 2017-04-10 16:17:25 +02:00 committed by GitHub
commit 1dda2a5810

View File

@ -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 ->