mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
Merge remote-tracking branch 'origin/topic/arne.welzel/fix-poll-interval-is-live'
* origin/topic/arne.welzel/fix-poll-interval-is-live: iosource/Manager: Fix poll_interval updating using not-yet valid IsLive()
This commit is contained in:
commit
6ac72a31bf
4 changed files with 37 additions and 3 deletions
|
@ -402,12 +402,16 @@ void Manager::Register(PktSrc* src)
|
|||
{
|
||||
pkt_src = src;
|
||||
|
||||
Register(src, false);
|
||||
|
||||
// Once we know if the source is live or not, adapt the
|
||||
// poll_interval accordingly.
|
||||
//
|
||||
// Note that src->IsLive() is only valid after calling Register().
|
||||
if ( src->IsLive() )
|
||||
poll_interval = BifConst::io_poll_interval_live;
|
||||
else if ( run_state::pseudo_realtime )
|
||||
poll_interval = 1;
|
||||
|
||||
Register(src, false);
|
||||
}
|
||||
|
||||
static std::pair<std::string, std::string> split_prefix(std::string path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue