redis-node-client
redis-node-client copied to clipboard
"noconnection" event not emitted if Redis goes away after the first connection
To reproduce,
- create a script having a redis client object and a "noconnection" listener
- kill redis
- run the script - noconnection event fires as expected
- start redis
- run the script
- kill redis
- script bombs out with an exception thrown and no "noconnection" event
If you remove the "throw e" under the client.maybeReconnect() call in the stream "error" listener, that behaves as expected - a stream of "reconnecting" events followed by a "noconnection" after the maximum reconnect count is reached.