[ https://issues.apache.org/jira/browse/THRIFT-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626745#comment-14626745 ]
ASF GitHub Bot commented on THRIFT-3243: ---------------------------------------- GitHub user abhinav opened a pull request: https://github.com/apache/thrift/pull/550 THRIFT-3243: Fix connection leak in THttpClient You can merge this pull request into a Git repository by running: $ git pull https://github.com/abhinav/thrift THRIFT-3243 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/550.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #550 ---- commit 75b1c3339a7022c3177a6a8605a4f8ba9742a2d1 Author: Abhinav Gupta <m...@abhinavg.net> Date: 2015-07-14T17:40:33Z THRIFT-3243: [py] Fix connection leak in THttpClient ---- > Possible socket leak in THttpClient > ----------------------------------- > > Key: THRIFT-3243 > URL: https://issues.apache.org/jira/browse/THRIFT-3243 > Project: Thrift > Issue Type: Bug > Components: Python - Library > Reporter: Abhinav Gupta > Priority: Minor > > In THttpClient, the system does not close an HTTP connection until a > consecutive request is made: > def flush(self): > if self.isOpen(): > self.close() > self.open() > If the THttpClient is discarded right after making a request, it will leave > the connection open until it's garbage collected. It will be safer to close > the connection after making the request. > Pull request upcoming. -- This message was sent by Atlassian JIRA (v6.3.4#6332)