Merge pull request #13 from bricecarpentier/master

Fixed issue #12
This commit is contained in:
Matthew Little 2014-02-27 11:33:42 -07:00
commit d45c2fadc6
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(results){
@ -122,6 +122,7 @@ function DaemonInterface(options){
//public members
this.init = init;
this.isOnline = isOnline;
this.cmd = cmd;
}

View File

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