From 6d250b8ec3848307838451f6854a9c191f23abbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Am=C3=A9lia=20Coutard-Sander?= Date: Tue, 26 Nov 2024 12:02:33 +0100 Subject: [PATCH] Fix pull issues: the sleep needs to be as long as the repo cloning --- README.txt | 1 + daemon.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index cf4f582..4d722d5 100644 --- a/README.txt +++ b/README.txt @@ -22,6 +22,7 @@ TODO: - Rewrite in C as a proper gnunet service, should fix the cadet pushing issues. - Specific GNS record type ? - Figure out why cadet breaks when pushing, probably linked to the usage of the CLI client, C rewrite might fix. + - gnunet-cadet exits too early, definitely an issue with the input method. C will probably fix the issue. In the meantime, a cat+sleep is a reasonnable enough "fix". - In which case, password system to push to repos (just add the password to the port ?) - Pulling from anyone using a commit hash ? - DHT to figure out who has what commits ? diff --git a/daemon.sh b/daemon.sh index a4866c4..0d9d747 100755 --- a/daemon.sh +++ b/daemon.sh @@ -16,7 +16,7 @@ name="$2" echo >&2 "Running $service on port \`git.$name.git-$service'." mktempfifo -while < "$fifo_name" gnunet-cadet -o "git.$name.git-$service" | git "$service" . | (cat; sleep 0.1) | cat > "$fifo_name"; test 130 != "$?"; do +while < "$fifo_name" gnunet-cadet -o "git.$name.git-$service" | git "$service" . | (cat; sleep 5) | cat > "$fifo_name"; test 130 != "$?"; do rm "$fifo_name" mktempfifo done -- 2.46.0