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){ isOnline(function(online){
if (online) if (online)
_this.emit('online'); _this.emit('online');
}); });
})(); };
function isOnline(callback){ function isOnline(callback){
cmd('getinfo', [], function(results){ cmd('getinfo', [], function(results){
@ -122,6 +122,7 @@ function DaemonInterface(options){
//public members //public members
this.init = init;
this.isOnline = isOnline; this.isOnline = isOnline;
this.cmd = cmd; this.cmd = cmd;
} }

View File

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