mirror of https://github.com/BTCPrivate/z-nomp.git
fix proxy state loading bug when key not present
This commit is contained in:
parent
201d02d10b
commit
b9891c8624
|
@ -210,11 +210,15 @@ module.exports = function(logger){
|
|||
redisClient.on('ready', function(){
|
||||
redisClient.hgetall("proxyState", function(error, obj) {
|
||||
if (error) {
|
||||
proxyState = {};
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'No last proxy state found in redis');
|
||||
}
|
||||
else {
|
||||
proxyState = obj;
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Last proxy state loaded from redis');
|
||||
if (obj != null)
|
||||
{
|
||||
proxyState = obj;
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Last proxy state loaded from redis');
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue