summaryrefslogtreecommitdiff
path: root/src/tools/oping/oping_client.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-08-16 18:41:19 +0000
committerSander Vrijders <sander@ouroboros.rocks>2026-08-31 08:31:45 +0200
commita830ed966eb3b7d6dbcc43e42a7b6b7c5d796c6a (patch)
treeffbbc3fa75f7802d14410ed3766379022a028988 /src/tools/oping/oping_client.c
parent5499872ffffc3bf3c64fce7f52456c43687a969b (diff)
downloadouroboros-a830ed966eb3b7d6dbcc43e42a7b6b7c5d796c6a.tar.gz
ouroboros-a830ed966eb3b7d6dbcc43e42a7b6b7c5d796c6a.zip
tools: Immediaty send oping request
The oping client was waiting for one interval before sending. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools/oping/oping_client.c')
-rw-r--r--src/tools/oping/oping_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c
index 4b01315d..b60c73cb 100644
--- a/src/tools/oping/oping_client.c
+++ b/src/tools/oping/oping_client.c
@@ -193,8 +193,6 @@ void * writer(void * o)
pthread_cleanup_push(free, buf);
while (!stop && client.sent < client.count) {
- nanosleep(&wait, NULL);
-
clock_gettime(CLOCK_MONOTONIC, &now);
msg->type = htonl(ECHO_REQUEST);
@@ -206,6 +204,8 @@ void * writer(void * o)
printf("Failed to send packet.\n");
stop = true;
}
+
+ nanosleep(&wait, NULL);
}
pthread_cleanup_pop(true);