Merge jn/maint-http-error-message
[gitweb.git] / builtin / send-pack.c
index eb38ab4e01fac3b8ba2d564b31d17da21206f06b..c1f6ddd927d61fbc2558ee3624224af405d918c3 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "commit.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -344,6 +344,8 @@ int send_pack(struct send_pack_args *args,
                                ref->status = REF_STATUS_NONE;
                        if (args->stateless_rpc)
                                close(out);
+                       if (git_connection_is_socket(conn))
+                               shutdown(fd[0], SHUT_WR);
                        if (use_sideband)
                                finish_async(&demux);
                        return -1;