fix(app): Exiting app if IPFS lock file is being held

This commit is contained in:
Chris Troutner
2021-09-04 17:51:27 -07:00
parent 9bddcf1c8e
commit 488c5d3c22
+7
View File
@@ -38,6 +38,13 @@ class IPFS {
return true
} catch (err) {
console.error('Error in adapters/ipfs/index.js/start()')
// If error is due to a lock file issue. Kill the process, so that
// Docker or pm2 has a chance to restart the service.
if (err.message.includes('Lock already being held')) {
process.exit(1)
}
throw err
}
}