Reputation: 335
while running following code
for (var i= 0; i< 20; i++) {
redisClient.lindex("devices", i, function (errorMessage, DeviceList) {
for (var j= 0; j< 20; j++) {
var deviceCoordinateList = resultData[j].split(',');
var deviceCoordinate = deviceCoordinateList[0]+i+ ','+deviceCoordinateList [1]+i;
redisClient.lpush(DeviceList, deviceCoordinate, redisInitialise.print);
}
});
}
i am getting the error:
Error: Error: Redis connection gone from close event.
how to fix it ?
Upvotes: 0
Views: 669
Reputation:
you might be doing something wrong. I think you are writing redis quit() function at wrong place
redisClient.quit();
Upvotes: 3