Skip to content

Commit 80b5b69

Browse files
committed
Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into js/maint-send-pack-stateless-rpc-deadlock-fix
* js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix: send-pack: unbreak push over stateless rpc
2 parents 73776dc + e07fd15 commit 80b5b69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin-send-pack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
9898
free(buf);
9999
close(po.out);
100100
po.out = -1;
101-
close(fd);
102101
}
103102

104103
if (finish_command(&po))
@@ -340,6 +339,8 @@ int send_pack(struct send_pack_args *args,
340339
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
341340
for (ref = remote_refs; ref; ref = ref->next)
342341
ref->status = REF_STATUS_NONE;
342+
if (args->stateless_rpc)
343+
close(out);
343344
if (use_sideband)
344345
finish_async(&demux);
345346
return -1;

0 commit comments

Comments
 (0)