When the disconnection happens and connectTimeoutMS is over, I want to do something. I'm using this options in my mongoose configuration:

```js
var options = {
  server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }
};

```

So after 30 seconds it gives up trying to reconnect. Is there any nice solution so I can handle this **give-up event**? I want to do something just after connectTimeoutMS is out.
It should first try to reconnect for 30 seconds and then if it fails - make a warning that it couldn't re-connect.