mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
zeromq: Call super class DoTerminate() after stopping thread
The internal ZeroMQ thread would call QueueForProcessing() thereby accessing the onloop member. As ThreadedBackend::DoTerminate() unsets it, this was a) reported as a data race by TSAN and b) potentially caused missed events that were still to be queued.
This commit is contained in:
parent
79c4fdb237
commit
63d31d7d9f
1 changed files with 2 additions and 2 deletions
|
@ -116,8 +116,6 @@ void ZeroMQBackend::DoInitPostScript() {
|
|||
}
|
||||
|
||||
void ZeroMQBackend::DoTerminate() {
|
||||
ThreadedBackend::DoTerminate();
|
||||
|
||||
// If self_thread is running, notify it to shutdown via the inproc
|
||||
// socket, then wait for it to terminate.
|
||||
if ( self_thread.joinable() && ! self_thread_shutdown_requested ) {
|
||||
|
@ -152,6 +150,8 @@ void ZeroMQBackend::DoTerminate() {
|
|||
proxy_thread.reset();
|
||||
}
|
||||
|
||||
// ThreadedBackend::DoTerminate() cleans up the onloop instance.
|
||||
ThreadedBackend::DoTerminate();
|
||||
ZEROMQ_DEBUG("Terminated");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue