Permalink
Browse files

Release the connection as early as possible in HTTPClient.

  • Loading branch information...
s-ludwig committed Mar 21, 2018
1 parent 064ddd6 commit e3a0d3a18ff91d7b6e1ff7300a5c039cf7d0bb45
Showing with 2 additions and 4 deletions.
  1. +2 −4 http/vibe/http/client.d
@@ -378,10 +378,8 @@ final class HTTPClient {
catch (Exception e) logDebug("Failed to finalize connection stream when closing HTTP client connection: %s", e.msg);
m_conn.close();
}
if (m_useTLS) {
() @trusted { return destroy(m_stream); } ();
m_stream = InterfaceProxy!Stream.init;
}
if (m_useTLS) () @trusted { return destroy(m_stream); } ();
m_stream = InterfaceProxy!Stream.init;
() @trusted { return destroy(m_conn); } ();
m_conn = TCPConnection.init;
}

0 comments on commit e3a0d3a

Please sign in to comment.