mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
hopefully finally fix last interesting race-condition
This commit is contained in:
parent
808639fc5f
commit
37566e73d8
1 changed files with 5 additions and 3 deletions
|
@ -196,7 +196,7 @@ void MsgThread::OnWaitForStop()
|
|||
uint64_t last_size = 0;
|
||||
uint64_t cur_size = 0;
|
||||
|
||||
while ( ! (main_finished || Killed() ) )
|
||||
while ( ! main_finished )
|
||||
{
|
||||
// Terminate if we get another kill signal.
|
||||
if ( signal_val == SIGTERM || signal_val == SIGINT )
|
||||
|
@ -221,8 +221,10 @@ void MsgThread::OnWaitForStop()
|
|||
signal_val = 0;
|
||||
}
|
||||
|
||||
queue_in.WakeUp();
|
||||
while ( HasOut() && !Killed() )
|
||||
if ( !Killed() )
|
||||
queue_in.WakeUp();
|
||||
|
||||
while ( HasOut() )
|
||||
{
|
||||
Message* msg = RetrieveOut();
|
||||
assert ( msg );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue