diff options
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/backend.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index e5b7409d12..11282f667d 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -285,15 +285,14 @@ export class Backend { } } - disconnect(): Promise<void> { + async disconnect(): Promise<void> { // @TODO: Failure modes - return this._ensureAuthenticated() - .then( () => { - return this._ipc.disconnect() - .catch(e => { - log.info('Failed to disconnect,', e.message); - }); - }); + try { + await this._ensureAuthenticated(); + await this._ipc.disconnect(); + } catch (e) { + log.error('Failed to disconnect: ', e.message); + } } shutdown(): Promise<void> { |
