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

Fixes #9290: Add an API endpoint to call rudder-remote-run #1274

Conversation

VinceMacBuche
Copy link
Member

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_9290/add_an_api_endpoint_to_call_rudder_remote_run branch from e0775d7 to e60647d Compare October 14, 2016 08:47

} catch {
case e : IOException =>
// should we log ? Should we end ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't do that, or you will leak ressource. The best way to handle that is to let the exception throws here, and manages it above. As your method is only used locally, it's ok. So remove try/catch here.

pb.setProcessListener(handler)
pb.start();

runResponse(in)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, add a try catch, and on exception, close all the open resources: in, out

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_9290/add_an_api_endpoint_to_call_rudder_remote_run branch from e60647d to cf02f06 Compare October 14, 2016 12:52
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit cf02f06 into Normation:master Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants