1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-30 05:47:53 +01:00

Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'

* js/maint-send-pack-stateless-rpc-deadlock-fix:
  send-pack: unbreak push over stateless rpc
  send-pack: avoid deadlock when pack-object dies early
This commit is contained in:
Junio C Hamano 2011-05-13 11:02:29 -07:00
commit e9c1a3a426

View file

@ -229,6 +229,9 @@ static void print_helper_status(struct ref *ref)
static int sideband_demux(int in, int out, void *data)
{
int *fd = data;
#ifdef NO_PTHREADS
close(fd[1]);
#endif
int ret = recv_sideband("send-pack", fd[0], out);
close(out);
return ret;
@ -339,6 +342,8 @@ int send_pack(struct send_pack_args *args,
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
for (ref = remote_refs; ref; ref = ref->next)
ref->status = REF_STATUS_NONE;
if (args->stateless_rpc)
close(out);
if (use_sideband)
finish_async(&demux);
return -1;