Catch exceptions on Consumer destructor

Fixes #6
This commit is contained in:
Matias Fontanini
2017-09-14 19:26:23 -07:00
parent 37cb16c3f5
commit 4c9aa6fcd4

View File

@@ -65,7 +65,13 @@ Consumer::Consumer(Configuration config)
}
Consumer::~Consumer() {
close();
try {
close();
}
catch (const Exception&) {
// If close throws just silently ignore until there's some
// logging facility (if any)
}
}
void Consumer::set_assignment_callback(AssignmentCallback callback) {