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

Keep http connection open for long-time #208

Open
orinciog opened this issue Feb 24, 2023 · 1 comment
Open

Keep http connection open for long-time #208

orinciog opened this issue Feb 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@orinciog
Copy link

Hi!

I'm using thriftpy2 to connect to a hbase thrift server, which has enabled http mode.
We need long-lived connections to our http server in order to save time.

I saw a couple of lines in http.py which prevents to do this:

if self.isOpen():
    self.close()
self.open()

Basically these lines prevent to use headers such as Connection: keep-alive or use low-level socket keep-alive, because they close the underlining socket before a request.

Can I submit a PR to opt-out for those lines?
Thank you.

@ethe
Copy link
Member

ethe commented Feb 25, 2023

Yes, we are glad to submit a PR to support it, thank you.

@aisk aisk added the enhancement New feature or request label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants