mirror of
https://github.com/mclueppers/xo-server.git
synced 2025-04-08 20:55:02 +02:00
Do not crash when a server is unavailable (fixes #8).
This commit is contained in:
parent
e53742e554
commit
87b880d869
@ -15,8 +15,6 @@ function Xapi(host)
|
||||
port: '443',
|
||||
rejectUnauthorized: false,
|
||||
}); // @todo Handle connection success/error.
|
||||
|
||||
this.errors = [];
|
||||
}
|
||||
require('util').inherits(Xapi, require('events').EventEmitter);
|
||||
|
||||
@ -37,10 +35,6 @@ Xapi.prototype.call = function (method) {
|
||||
}
|
||||
|
||||
return value.Value;
|
||||
})
|
||||
.fail(function (error) {
|
||||
self.errors.push(error);
|
||||
throw error;
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user