coleifer/peewee — pull request #448 by alexlatchford (2014-10-24 00:22:17+00:00)
Title: Add in support for detecting server closed connections in postgres

How about this implementation? Making use of your approach but still including it in the main repo, as much as I'd like to I'd like to contribute back to the main repo for things like this :)