summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-28 10:12:43 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-11-28 15:50:18 +0000
commit30ac46aa469b06cd47efa9625c2bf4862f8494b7 (patch)
treebd88ae066c2c92190893cacf1970021cf30c8660
parent02bb39f448b9ed151a638d22fdcbccc895f4d3cf (diff)
downloadlibgit2-30ac46aa469b06cd47efa9625c2bf4862f8494b7.tar.gz
http: reset replay_count upon connectionethomson/proxy
Reset the replay_count upon a successful connection. It's possible that we could encounter a situation where we connect successfully but need to replay a request - for example, a connection and initial request succeeds without authentication but a subsequent call does require authentication. Reset the replay count upon any successful request to afford subsequent replays room to manuever.
-rw-r--r--src/transports/http.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/transports/http.c b/src/transports/http.c
index 611ec163f..3a0d2cc02 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -990,6 +990,7 @@ static int http_connect(http_subtransport *t)
t->proxy.stream = proxy_stream;
t->server.stream = stream;
t->connected = 1;
+ t->replay_count = 0;
return 0;
on_error: