We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 58532ed + ac11219 commit 2bc36faCopy full SHA for 2bc36fa
src/transports/smart.c
@@ -272,6 +272,18 @@ static int git_smart__close(git_transport *transport)
272
unsigned int i;
273
git_pkt *p;
274
int ret;
275
+ git_smart_subtransport_stream *stream;
276
+ const char flush[] = "0000";
277
+
278
+ /*
279
+ * If we're still connected at this point and not using RPC,
280
+ * we should say goodbye by sending a flush, or git-daemon
281
+ * will complain that we disconnected unexpectedly.
282
+ */
283
+ if (t->connected && !t->rpc &&
284
+ !t->wrapped->action(&stream, t->wrapped, t->url, GIT_SERVICE_UPLOADPACK)) {
285
+ t->current_stream->write(t->current_stream, flush, 4);
286
+ }
287
288
ret = git_smart__reset_stream(t, true);
289
0 commit comments