{"action":"created","issue":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/586","labels_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/586/labels{/name}","comments_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/586/comments","events_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/586/events","html_url":"https://github.com/NodeRedis/node_redis/issues/586","id":33187052,"number":586,"title":"Event for reconnection giving up","user":{"login":"PaquitoSoft","id":166022,"avatar_url":"https://avatars.githubusercontent.com/u/166022?v=3","gravatar_id":"","url":"https://api.github.com/users/PaquitoSoft","html_url":"https://github.com/PaquitoSoft","followers_url":"https://api.github.com/users/PaquitoSoft/followers","following_url":"https://api.github.com/users/PaquitoSoft/following{/other_user}","gists_url":"https://api.github.com/users/PaquitoSoft/gists{/gist_id}","starred_url":"https://api.github.com/users/PaquitoSoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaquitoSoft/subscriptions","organizations_url":"https://api.github.com/users/PaquitoSoft/orgs","repos_url":"https://api.github.com/users/PaquitoSoft/repos","events_url":"https://api.github.com/users/PaquitoSoft/events{/privacy}","received_events_url":"https://api.github.com/users/PaquitoSoft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-05-09T16:29:36Z","updated_at":"2015-08-15T19:47:38Z","closed_at":"2015-08-15T19:47:38Z","body":"Hello:\r\n\r\nI think it would be great if the client would emit an event when it gives up trying to reconnect to a dead Redis instance because a user configured it to do so using _connect_timeout_ or _max_attempts_ attributes.\r\n\r\nI mean updating this code:\r\n```\r\nif (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) {\r\n    self.retry_timer = null;\r\n    // TODO - engage Redis is Broken mode for future commands, or whatever\r\n    console.error(\"node_redis: Couldn't get Redis connection after \" + self.retry_totaltime + \"ms.\");\r\n    return;\r\n}\r\n```\r\n\r\nto look something like this:\r\n```\r\nif (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) {\r\n    self.retry_timer = null;\r\n    self.emit('reconnectionGiveup');\r\n    return;\r\n}\r\n```\r\n\r\nand the same for the _max_attemps_ case."},"comment":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/comments/131438028","html_url":"https://github.com/NodeRedis/node_redis/issues/586#issuecomment-131438028","issue_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/586","id":131438028,"user":{"login":"blainsmith","id":483829,"avatar_url":"https://avatars.githubusercontent.com/u/483829?v=3","gravatar_id":"","url":"https://api.github.com/users/blainsmith","html_url":"https://github.com/blainsmith","followers_url":"https://api.github.com/users/blainsmith/followers","following_url":"https://api.github.com/users/blainsmith/following{/other_user}","gists_url":"https://api.github.com/users/blainsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/blainsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blainsmith/subscriptions","organizations_url":"https://api.github.com/users/blainsmith/orgs","repos_url":"https://api.github.com/users/blainsmith/repos","events_url":"https://api.github.com/users/blainsmith/events{/privacy}","received_events_url":"https://api.github.com/users/blainsmith/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T19:47:38Z","updated_at":"2015-08-15T19:47:38Z","body":"In order to better support this project and its new group of collaborators under a new org we are trying to clean up and close issues older than 6 months. Your issue may have been fixed since the issue was open, however, if you are still experiencing a problem **please** re-open this issue and we will label it accordingly."}}