mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Merge error and fatal
This commit is contained in:
parent
e857eb1b47
commit
9ebb95c69d
7 changed files with 17 additions and 20 deletions
|
|
@ -34,13 +34,13 @@ module.exports = require('./core').extend({
|
|||
|
||||
if(cmd == 'Connect') {
|
||||
var client = self.gbxclient = gbxremote.createClient(self.options.port,self.options.host, function(err) {
|
||||
if(err) return self.error('GBX error '+JSON.stringify(err));
|
||||
if(err) return self.fatal('GBX error '+JSON.stringify(err));
|
||||
c();
|
||||
});
|
||||
client.on('error',function(){});
|
||||
} else {
|
||||
self.gbxclient.methodCall(cmd, params, function(err, value) {
|
||||
if(err) return self.error('XMLRPC error '+JSON.stringify(err));
|
||||
if(err) return self.fatal('XMLRPC error '+JSON.stringify(err));
|
||||
results.push(value);
|
||||
c();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue