summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 6512bf7..eff605e 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -534,6 +534,11 @@ static inline void init(int argc, char *argv[]) {
VECTOR_ALLOC(ctx.peers, 0);
VECTOR_ALLOC(ctx.async_pids, 0);
+#ifdef WITH_VERIFY
+ if (sem_init(&ctx.verify_limit, 0, VERIFY_LIMIT))
+ exit_errno("sem_init");
+#endif
+
if (pthread_attr_init(&ctx.detached_thread))
exit_errno("pthread_attr_init");
if (pthread_attr_setdetachstate(&ctx.detached_thread, PTHREAD_CREATE_DETACHED))