aboutsummaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index 7d172ef37..edbfd076a 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -300,8 +300,12 @@ int send_pack(struct send_pack_args *args,
shutdown(fd[0], SHUT_WR);
if (use_sideband)
finish_async(&demux);
+ fd[1] = -1;
return -1;
}
+ if (!args->stateless_rpc)
+ /* Closed by pack_objects() via start_command() */
+ fd[1] = -1;
}
if (args->stateless_rpc && cmds_sent)
packet_flush(out);