summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Ang-Wanek <tylerw@axosoft.com>2021-04-30 15:11:54 -0700
committerTyler Ang-Wanek <tylerw@axosoft.com>2021-05-12 11:42:27 -0700
commit049618cebe5848e8c5456c32fd136aefdeecccc6 (patch)
tree448e3dac6386f5f5a13126f21e7e8efbcb772c24
parentcabfa3b30cfae24ec6d7d75c5cf052e052cbf131 (diff)
downloadlibgit2-049618cebe5848e8c5456c32fd136aefdeecccc6.tar.gz
httpclient: git_http_client_skip_body should drain socket of body
-rw-r--r--src/transports/httpclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transports/httpclient.c b/src/transports/httpclient.c
index d3975746b..4ba6da017 100644
--- a/src/transports/httpclient.c
+++ b/src/transports/httpclient.c
@@ -1503,7 +1503,7 @@ int git_http_client_skip_body(git_http_client *client)
"unexpected data handled in callback");
error = -1;
}
- } while (!error);
+ } while (error >= 0 && client->state != DONE);
if (error < 0)
client->connected = 0;