visionmedia/connect-redis — pull request #50 by louischatriot (2012-07-18 12:57:51+00:00)
Title: Prevent node from crashing if there is a connection problem to Redis

Hello,

I am using the session middleware for Connect with a Redis memory store managed by connect-redis. Currently, if it is not possible to connect to Redis (if it is down for example), node simply crashes. I find that having your whole server go down simply because your session store is not avaiable to be too much !

This PR enables me to use a "safe mode" that gracefully handles this situation by catching the error, preventing it from bubbling up and making node crash. In addition, a 'store.connectionProblem' flag is set up so that anyone using the Redis Store (in my case the session middleware) can also handle the error.

Cheers,
Louis