Github user adeneche commented on a diff in the pull request:
https://github.com/apache/drill/pull/157#discussion_r39441721
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControllerImpl.java
---
@@ -60,11 +62,13 @@ public ControlTunnel getTunnel(DrillbitEndpoint
endpoint) {
return new ControlTunnel(endpoint,
connectionRegistry.getConnectionManager(endpoint));
}
- public void close() {
- Closeables.closeQuietly(server);
- for (ControlConnectionManager bt : connectionRegistry) {
- bt.close();
+ public void close() throws IOException {
+ try {
+ Closeables.close(server, true);
+ } finally {
+ for (ControlConnectionManager bt : connectionRegistry) {
--- End diff --
If you are trying to make sure all resources are closed even if
`server.close()` throws a runtime exception, then you are only solving half the
problem. if `bt.close()` throws an exception then the loop may not proceed
through the connection registry
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---