LearnBoost/mongoose — pull request #1007 by aheckmann (2012-07-14 00:00:03+00:00)
Title: Improve connection events

additional events are now emitted on the connection (connected, connecting, disconnected, disconnecting)

connection errors are never swallowed. errors are passed to callbacks when available, otherwise emitted on the connection in the `error` event.

IMPORTANT: not listening to your connection's error event will cause them to be thrown. you should handle these errors in your application. relates to #618

---

these changes will help us when the driver allows us to be more aware of connection changes to facilitate graceful buffering etc - #1006