Merge branch 'issue_012'

This commit is contained in:
Brice Carpentier 2014-02-27 10:28:52 +01:00
commit 09e1c34192
2 changed files with 5 additions and 2 deletions

View File

@ -26,12 +26,12 @@ function DaemonInterface(options){
})();
(function init(){
function init(){
isOnline(function(online){
if (online)
_this.emit('online');
});
})();
};
function isOnline(callback){
cmd('getinfo', [], function(error, result){
@ -110,6 +110,7 @@ function DaemonInterface(options){
//public members
this.init = init;
this.isOnline = isOnline;
this.cmd = cmd;
}

View File

@ -279,6 +279,8 @@ var pool = module.exports = function pool(options, authorizeFn){
}).on('error', function(message){
emitErrorLog('system', message);
});
_this.daemon.init();
}