mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-09 21:46:12 +00:00
check ipfs connection before attempting to connect
This commit is contained in:
parent
97c87edc70
commit
b903257170
@ -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'});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user