Commit ace0d36b by Patrick Steinhardt Committed by GitHub

Merge pull request #3900 from pks-t/pks/http-close-substream-on-connect

transports: http: set substream as disconnected after closing
parents 5671e81f b1453601
...@@ -599,6 +599,7 @@ static int http_connect(http_subtransport *t) ...@@ -599,6 +599,7 @@ static int http_connect(http_subtransport *t)
git_stream_close(t->io); git_stream_close(t->io);
git_stream_free(t->io); git_stream_free(t->io);
t->io = NULL; t->io = NULL;
t->connected = 0;
} }
if (t->connection_data.use_ssl) { if (t->connection_data.use_ssl) {
...@@ -1035,6 +1036,8 @@ static int http_close(git_smart_subtransport *subtransport) ...@@ -1035,6 +1036,8 @@ static int http_close(git_smart_subtransport *subtransport)
clear_parser_state(t); clear_parser_state(t);
t->connected = 0;
if (t->io) { if (t->io) {
git_stream_close(t->io); git_stream_close(t->io);
git_stream_free(t->io); git_stream_free(t->io);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment