diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-08 20:42:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 20:42:45 -0500 |
commit | d299a7aad66e8e32135d801f47d46fecf9042b9f (patch) | |
tree | eb9d80886fa0e0c476b9fc26abafa91a472f0f15 /src/transports/smart_protocol.c | |
parent | 1e7c8b1f644e44de881a3c15b743bb558c3a71e6 (diff) | |
parent | aceac672fd0431ec55d4efe3f037c596700ad46c (diff) | |
download | libgit2-d299a7aad66e8e32135d801f47d46fecf9042b9f.tar.gz |
Merge pull request #6205 from ccstolley/ccs_fix_http_push_timeout
push: Prepare pack before sending pack header.
Diffstat (limited to 'src/transports/smart_protocol.c')
-rw-r--r-- | src/transports/smart_protocol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c index 06102817d..adfc30466 100644 --- a/src/transports/smart_protocol.c +++ b/src/transports/smart_protocol.c @@ -1036,6 +1036,10 @@ int git_smart__push(git_transport *transport, git_push *push) } } + /* prepare pack before sending pack header to avoid timeouts */ + if (need_pack && ((error = git_packbuilder__prepare(push->pb))) < 0) + goto done; + if ((error = git_smart__get_push_stream(t, &packbuilder_payload.stream)) < 0 || (error = gen_pktline(&pktline, push)) < 0 || (error = packbuilder_payload.stream->write(packbuilder_payload.stream, git_str_cstr(&pktline), git_str_len(&pktline))) < 0) |