mirror of
https://github.com/outbackdingo/nDPId.git
synced 2026-01-27 10:19:45 +00:00
nDPId-test: Fixed thread sync/lock issue.
* rarely happens in CI Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -15,8 +15,8 @@ before_script:
|
||||
netcat-openbsd python3 python3-jsonschema tree lcov
|
||||
|
||||
after_script:
|
||||
- cat /tmp/nDPIsrvd.log
|
||||
- cat /tmp/nDPId.log
|
||||
- test -r && cat /tmp/nDPIsrvd.log
|
||||
- test -r && cat /tmp/nDPId.log
|
||||
|
||||
build_and_test:
|
||||
script:
|
||||
|
||||
@@ -293,6 +293,7 @@ error:
|
||||
drain_write_buffers_blocking(mock_arpa_desc);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&nDPIsrvd_start_mutex);
|
||||
free_remotes(epollfd);
|
||||
close(epollfd);
|
||||
|
||||
@@ -415,6 +416,9 @@ static enum nDPIsrvd_callback_return distributor_json_callback(struct nDPIsrvd_s
|
||||
|
||||
global_stats->total_events_serialized = nmb;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&nDPIsrvd_start_mutex);
|
||||
pthread_mutex_unlock(&nDPId_start_mutex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -853,6 +857,7 @@ static void * nDPId_mainloop_thread(void * const arg)
|
||||
}
|
||||
|
||||
error:
|
||||
pthread_mutex_lock(&nDPId_start_mutex);
|
||||
free_reader_threads();
|
||||
close(mock_pipefds[PIPE_nDPId]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user