From bcd7220f4c740f41b640361d9fe5f0abf162d772 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 7 Jul 2018 20:47:40 +0300 Subject: [PATCH] check ipfs connection before attempting to connect --- lib/modules/ipfs/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/modules/ipfs/index.js b/lib/modules/ipfs/index.js index b870ef0e..7b5f89e5 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -59,6 +59,7 @@ class IPFS { } setServiceCheck() { + console.dir("setServiceCheck"); let self = this; self.events.on('check:backOnline:IPFS', function () { @@ -72,14 +73,14 @@ class IPFS { self.events.request("services:register", 'IPFS', function (cb) { self._checkService((err, body) => { if (err) { - self.logger.trace("IPFS unavailable"); + self.logger.info("IPFS unavailable"); return cb({name: "IPFS ", status: 'off'}); } if (body.Version) { - self.logger.trace("IPFS available"); + self.logger.info("IPFS available"); return cb({name: ("IPFS " + body.Version), status: 'on'}); } - self.logger.trace("IPFS available"); + self.logger.info("IPFS available"); return cb({name: "IPFS ", status: 'on'}); }); });