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

Fixed the Issue of TCP not closing #480

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

Conversation

jprakash-db
Copy link
Contributor

Description

Currently while closing a Connection the HTTPConnectionPool is not explicitly closed and just the buffer is emptied upon closing the connection. This creates the issue of the TCP connection being in ESTABLISHED phased indefinetly and not moving to the CLOSED phase.

Fix

  • Modified the code to only close the connection in case en error occurs while making a request
  • Setting the pool as None to ensure that the Python Garbage cleanup takes care of the final closure and releasing of the port

Testing

Tested by monitoring the connection port through the lifecycle of the query to verify its working

Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

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.

1 participant