Skip to content

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

@github-actions
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).

@samikshya-db
Copy link
Contributor

Are there plans of merging this, Jothi? Looks like this is indeed a nice improvement on the driver.

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.

3 participants