Added reconnect logic for redis connection