Commit ace0d36be90d8d5e92ed9f323ff4e0de213a5ef1

Patrick Steinhardt 2016-08-29T09:29:34

Merge pull request #3900 from pks-t/pks/http-close-substream-on-connect transports: http: set substream as disconnected after closing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/transports/http.c b/src/transports/http.c
index 30520a0..ca1f504 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -599,6 +599,7 @@ static int http_connect(http_subtransport *t)
 		git_stream_close(t->io);
 		git_stream_free(t->io);
 		t->io = NULL;
+		t->connected = 0;
 	}
 
 	if (t->connection_data.use_ssl) {
@@ -1035,6 +1036,8 @@ static int http_close(git_smart_subtransport *subtransport)
 
 	clear_parser_state(t);
 
+	t->connected = 0;
+
 	if (t->io) {
 		git_stream_close(t->io);
 		git_stream_free(t->io);