fsouza/go-dockerclient — pull request #171 by rafrombrc (2014-10-24 00:05:08+00:00)
Title: Close event listeners on EOF

An EOF or UnexpectedEOF error on the APIEvent decode operation typically means that the Docker daemon has stopped. In any event, it causes the HTTP response handler embedded in eventHijack to exit, which means that all existing registered listeners will no longer work, even if the daemon comes back, but the listeners themselves don't know anything has happened. This change causes the listener channels to be closed, which notifies client code that the listeners are no longer useful and new ones should be created and registered. This closes #163.