Emitting error event when connection permanently goes down#615
Conversation
|
👍 |
|
How about emitting an error instead of a "broken" event, then we will get the throw behavior. This won't do anything if nobody is listening for the "broken" event. |
|
That sounds good to me too, I only went for a special |
|
Yeah, an "error" with an error something to the effect of |
|
Sounds good - done, and squashed into single commit. |
…timeout Also documenting the "reconnecting" event
|
This appears to be an easily-fixed hole in the library. I provide a connection timeout option to the client and I need my program to know when the Redis client has given up; today it cannot know this without regularly inspecting the client object's retry_totaltime property. Please merge this and update in npm. |
|
this fixes issue #586 |
There was a problem hiding this comment.
Please remove both TODOs including the console.error
|
This needs a rebase and two small comments otherwise LGTM |
|
#829 has got this covered, closing this PR |
Also documenting the "reconnecting" event.
Happy to discuss this further, but either way, when working with sharded Redis instances (for instance using https://github.com/blindsey/redis-shard) it's helpful to have some way to know when a Redis server seems to have totally gone down so that we can send out alerts, remove it from the cluster, spin up another server, etc.