We've seen the master be unable to contact the secondary nodes, so it steps down (and a new master is elected). When this happens, the driver's existing connection suddenly becomes "not master", and throws an error on the next read/write. We'd like the mongo driver to handle (catch error and retry) this instead of bubbling it up to the application level (and having to patch every application.
Our current approach is to actually wrap the methods on Collection/Cursor. We originally tried to handle this on the Connection object directly, but this lead to an unmaintainable fork. If you were to add this directly to the driver, it might be a fine way to approach the problem. We tried to wrap the methods on Collection/Cursor per Kyle Banker's suggestion. Here is the code we are using. https://gist.github.com/d5ea38c973abdaddeeb0
This kind of thing should be turned off by default, but could be configured if the user of the driver wanted this sort of behavior.