Fix issue with swarm isAvailable

This commit is contained in:
emizzle 2018-09-06 21:57:10 +10:00
parent fcb75dee11
commit 2dc8d8c276
1 changed files with 1 additions and 2 deletions

View File

@ -39,8 +39,7 @@ class Swarm {
// swarm needs geth to be running first
this.events.once(constants.blockchain.blockchainReady, () => {
this.swarm.isAvailable((err, isAvailable) => {
if (err) return this.logger.error('Error checking swarm availability', err);
if (isAvailable) {
if (!err || isAvailable) {
this.logger.info("Swarm node found, using currently running node");
return;
}