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

Add is_open to check transport of connection #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sihyeonn
Copy link

@sihyeonn sihyeonn commented Dec 6, 2023

To check whether the transport of connection is open or not, It would be great is_open method exists.
Checking the connection first is helpful to prevent BrokenPIpeError from occuring and gives a chance to build a new connection.

AS-IS:

connection = hive.connect(host=_HOST)
print(connection._transport.isOpen())

TO-BE:

connection = hive.connect(host=_HOST)
print(connection.is_open())

Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
@CLAassistant
Copy link

CLAassistant commented Dec 6, 2023

CLA assistant check
All committers have signed the CLA.

@sihyeonn
Copy link
Author

@mdeshmu , this one is ready for CI and review.
Thanks

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.

None yet

2 participants