All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] upload-pack: Exit when server finishes sending shallow-update in stateless RPC mode
@ 2016-04-12  4:55 Stan Hu
  2016-04-12  5:39 ` Torsten Bögershausen
  0 siblings, 1 reply; 2+ messages in thread
From: Stan Hu @ 2016-04-12  4:55 UTC (permalink / raw)
  To: gitster; +Cc: git, Stan Hu

In the stateless RPC case, the server should respond to the client's depth
request with the set of commits which are no deeper than the desired
depth. Once this finishes, the server should terminate and receive the reply
in another POST request.

Previously the server would sit idle and die when it detected the client
closed the connection.

Signed-off-by: Stan Hu <stanhu@gmail.com>
---
 upload-pack.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/upload-pack.c b/upload-pack.c
index b3f6653..4fb1e60 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -676,6 +676,8 @@ static void receive_needs(void)
 			register_shallow(object->oid.hash);
 		}
 		packet_flush(1);
+		if (stateless_rpc)
+			exit(0);
 	} else
 		if (shallows.nr > 0) {
 			int i;
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-12  5:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12  4:55 [PATCH] upload-pack: Exit when server finishes sending shallow-update in stateless RPC mode Stan Hu
2016-04-12  5:39 ` Torsten Bögershausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.