I've been working with Monger lately for Mongodb connections, and one thing I'm trying to hammer out is exception handling of closed connections. I know that Monger exposes the MongoClient
, and there are also options for setting the heartbeat and server event listeners. Has anyone seen or implemented patterns for catching if the connection closes prematurely (fails)? Seems like this becomes an asynchronous process to handle properly.