From 1564a2c5112207d0aa8154941cdb57106fc1d9d6 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 f4a5fcc1..16808c9f 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -52,6 +52,7 @@ class IPFS { } setServiceCheck() { + console.dir("setServiceCheck"); let self = this; self.events.on('check:backOnline:IPFS', function () { @@ -65,14 +66,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'}); }); });