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

feat: Add close method to Client #34

Merged
merged 3 commits into from
Dec 21, 2017

Conversation

tsuyoshizawa
Copy link
Contributor

@tsuyoshizawa tsuyoshizawa commented Oct 11, 2017

Client class closes http client by finalize method.
However, the method is not promised to be called.

The class should have close method to call closing http client expressly.
In additional, we shouldn't call finalize method expressly if we want to close the client.

Closeable interface supports try-with-resources Statement.
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

- Implement closeable interface
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 11, 2017
@SendGridDX
Copy link

SendGridDX commented Oct 11, 2017

CLA assistant check
All committers have signed the CLA.

@thinkingserious
Copy link
Contributor

Thank you @tsuyoshizawa!

Would you mind signing our CLA so that we may merge your work? It's just a quick web form.

With Best Regards,

Elmer

@thinkingserious thinkingserious added difficulty: easy fix is easy in difficulty hacktoberfest status: work in progress Twilio or the community is in the process of implementing type: community enhancement feature request not on Twilio's roadmap labels Oct 11, 2017
@tsuyoshizawa
Copy link
Contributor Author

@thinkingserious I signed the CLA.

@andy-trimble
Copy link
Contributor

LGTM

@mbernier
Copy link
Contributor

mbernier commented Nov 3, 2017

@tsuyoshizawa

We have not been able to merge your Pull Request, but because you are awesome - we wanted to make sure you could still get a SendGrid Hacktoberfest shirt.

Please go fill out our swag form before Nov 5th and we will send the shirt! (We know that you might have tried this before and it didn’t work, sorry about that!)

You have till Nov 5th to fill out this form in order to get the Hacktoberfest shirt!

Thank you for contributing during Hacktoberfest! We hope to see you in the repos soon! Just so you know, we always give away a SendGrid shirt for your first ever non-Hacktoberfest PR that gets merged.

@thinkingserious thinkingserious merged commit 8a6e55c into sendgrid:master Dec 21, 2017
@thinkingserious
Copy link
Contributor

Hello @tsuyoshizawa,

Thanks again for the PR!

We appreciate your contribution and look forward to continued collaboration. Thanks!

Team SendGrid DX

@eshanholtz eshanholtz changed the title Add close method to Client feat: Add close method to Client Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy fix is easy in difficulty status: code review request requesting a community code review or review from Twilio status: work in progress Twilio or the community is in the process of implementing type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants