mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Preventing writers/readers from receiving further messages after a
failure. Once a writer/reader Do* method has returned false, no further ones will be executed anymore. This is primarily a safety mechanism to make it easier for writer/reader authors as otherwise they would often need to track the failure state themselves (because with the now delayed termination from the earlier commit, furhter messages can now still arrive for a little bit).
This commit is contained in:
parent
86ae7d8b7c
commit
f5862fb014
8 changed files with 63 additions and 7 deletions
|
@ -201,6 +201,12 @@ protected:
|
|||
*/
|
||||
void HeartbeatInChild();
|
||||
|
||||
/** Returns true if a child command has reported a failure. In that case, we'll
|
||||
* be in the process of killing this thread and no further activity
|
||||
* should carried out. To be called only from this child thread.
|
||||
*/
|
||||
bool Failed() const { return failed; }
|
||||
|
||||
/**
|
||||
* Regulatly triggered for execution in the child thread.
|
||||
*
|
||||
|
@ -294,6 +300,7 @@ private:
|
|||
uint64_t cnt_sent_out; // Counts message sent by child.
|
||||
|
||||
bool finished; // Set to true by Finished message.
|
||||
bool failed; // Set to true when a command failed.
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue