Skip to content

Commit

Permalink
Merge pull request vibe-d#2483 from tchaloupka/httpclient_leak
Browse files Browse the repository at this point in the history
Fix refcounted FD leak in HTTPClient
  • Loading branch information
s-ludwig committed Oct 15, 2020
2 parents a567566 + 61bff81 commit b5afadb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions http/vibe/http/client.d
Expand Up @@ -636,10 +636,8 @@ final class HTTPClient {
scope(exit) m_requesting = false;

if (!m_conn || !m_conn.connected || m_conn.waitForDataEx(0.seconds) == WaitForDataStatus.noMoreData) {
if (m_conn) {
m_conn.close(); // make sure all resources are freed
m_conn = TCPConnection.init;
}
if (m_conn)
disconnect(); // make sure all resources are freed

if (m_settings.proxyURL.host !is null){

Expand Down

0 comments on commit b5afadb

Please sign in to comment.