Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close event listeners on EOF #171

Merged
merged 1 commit into from
Nov 11, 2014
Merged

Conversation

rafrombrc
Copy link
Contributor

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.

@fsouza
Copy link
Owner

fsouza commented Nov 11, 2014

Hi @rafrombrc, sorry for taking so long for having a look in this pull request, I will merge it and try to add some tests.

Thanks for working on it!

@fsouza fsouza merged commit 253de70 into fsouza:master Nov 11, 2014
@rafrombrc rafrombrc deleted the close_event_listeners branch November 11, 2014 17:21
@rafrombrc rafrombrc restored the close_event_listeners branch November 11, 2014 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EventListener stops receiving events after restart of Docker daemon
2 participants