summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-05-01 17:39:50 +0200
committerSander Vrijders <sander@ouroboros.rocks>2020-05-02 10:07:58 +0200
commit6415d0f683dbe5f20d4d00c74bf75a795753f444 (patch)
tree9e8d01a54c913f32fc188760178b66a4e8511241 /src
parent67e80f5a8939d688802484d070970b94cefd666d (diff)
downloadouroboros-6415d0f683dbe5f20d4d00c74bf75a795753f444.tar.gz
ouroboros-6415d0f683dbe5f20d4d00c74bf75a795753f444.zip
tools: Stop oping client cleanly on bad write
On a bad write, the writer thread would shutdown, leaving the client hanging. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src')
-rw-r--r--src/tools/oping/oping_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c
index d0255b7c..35f49aa2 100644
--- a/src/tools/oping/oping_client.c
+++ b/src/tools/oping/oping_client.c
@@ -179,6 +179,7 @@ void * writer(void * o)
printf("Failed to send packet.\n");
flow_dealloc(*fdp);
free(buf);
+ stop = true;
return (void *) -1;
}
}