mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Increase timeout value for live interfaces without file descriptors
This commit is contained in:
parent
efaa756539
commit
edb87821da
1 changed files with 3 additions and 3 deletions
|
@ -335,10 +335,10 @@ double PktSrc::GetNextTimeout()
|
|||
// If there's no file descriptor for the source, which is the case for some interfaces like
|
||||
// myricom, we can't rely on the polling mechanism to wait for data to be available. As gross
|
||||
// as it is, just spin with a short timeout here so that it will continually poll the
|
||||
// interface. The old IOSource code had a 20ns timeout between calls to select() so just
|
||||
// use that.
|
||||
// interface. The old IOSource code had a 20 microsecond timeout between calls to select()
|
||||
// so just use that.
|
||||
if ( props.selectable_fd == -1 )
|
||||
return 0.00000002;
|
||||
return 0.00002;
|
||||
|
||||
// If we're live we want poll to do what it has to with the file descriptor. If we're not live
|
||||
// but we're not in pseudo-realtime mode, let the loop just spin as fast as it can. If we're
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue