From a8907a059dd21822eae6c802ce649f530fee33aa Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 12 Feb 2018 14:22:31 -0500 Subject: [PATCH] Re-order timeout for update and restart BLE endpoints --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 91d7956..2608b94 100644 --- a/index.js +++ b/index.js @@ -545,12 +545,12 @@ function bReset (obj, cb) { } function bUpdate (obj, cb) { - cb() - setTimeout(() => { - exec('sh ./scripts/update.sh', (err, stdio, stderr) => { + exec('sh ./scripts/update.sh', (err, stdio, stderr) => { + cb() + setTimeout(() => { process.exit(0) - }) - }, 20) + }, 20) + }) } function bRestart (obj, cb) { cb()