Skip to content

Commit ace0d36

Browse files
authored
Merge pull request libgit2#3900 from pks-t/pks/http-close-substream-on-connect
transports: http: set substream as disconnected after closing
2 parents 5671e81 + b145360 commit ace0d36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/transports/http.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ static int http_connect(http_subtransport *t)
599599
git_stream_close(t->io);
600600
git_stream_free(t->io);
601601
t->io = NULL;
602+
t->connected = 0;
602603
}
603604

604605
if (t->connection_data.use_ssl) {
@@ -1035,6 +1036,8 @@ static int http_close(git_smart_subtransport *subtransport)
10351036

10361037
clear_parser_state(t);
10371038

1039+
t->connected = 0;
1040+
10381041
if (t->io) {
10391042
git_stream_close(t->io);
10401043
git_stream_free(t->io);

0 commit comments

Comments
 (0)