summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2023-09-20 12:45:37 +0200
committerSander Vrijders <[email protected]>2023-09-20 18:53:25 +0200
commit3662d75fa3a2cbe52fd9008754b1b6222342308d (patch)
treeabc5375679615e6d54d766ab48d7c4121c8eed4e
parent2df952d68587a6422f7462eee55c0f42904df4c9 (diff)
downloadouroboros-3662d75fa3a2cbe52fd9008754b1b6222342308d.tar.gz
ouroboros-3662d75fa3a2cbe52fd9008754b1b6222342308d.zip
ipcpd: Broadcast destruction of DHT requests0.20.0
When a request is cancelled/destroyed, all blocking threads should exit. Noticed some hangs on the DHT, this seems to fix/reduce it. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/ipcpd/unicast/dir/dht.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04b52c23..7b030d3f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,8 +8,8 @@ project(ouroboros C)
include(GNUInstallDirs)
set(PACKAGE_VERSION_MAJOR 0)
-set(PACKAGE_VERSION_MINOR 19)
-set(PACKAGE_VERSION_PATCH 3)
+set(PACKAGE_VERSION_MINOR 20)
+set(PACKAGE_VERSION_PATCH 0)
set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(PACKAGE_DESCRIPTION "The Ouroboros prototype")
diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c
index 7e4bd474..5b313e1f 100644
--- a/src/ipcpd/unicast/dir/dht.c
+++ b/src/ipcpd/unicast/dir/dht.c
@@ -449,7 +449,7 @@ static void kad_req_destroy(struct kad_req * req)
return;
case REQ_PENDING:
req->state = REQ_DESTROY;
- pthread_cond_signal(&req->cond);
+ pthread_cond_broadcast(&req->cond);
break;
case REQ_INIT:
case REQ_DONE: