mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Preventing Bro processes that do neither local logging nor request
remote logs from spawning threads. This applies to the proxy, which was still opening all the log files with then idle threads.
This commit is contained in:
parent
aa70ed592d
commit
c63d23f3af
1 changed files with 6 additions and 0 deletions
|
@ -2503,6 +2503,9 @@ bool RemoteSerializer::SendLogCreateWriter(PeerID peer_id, EnumVal* id, EnumVal*
|
|||
if ( peer->phase != Peer::HANDSHAKE && peer->phase != Peer::RUNNING )
|
||||
return false;
|
||||
|
||||
if ( ! peer->logs_requested )
|
||||
return false;
|
||||
|
||||
BinarySerializationFormat fmt;
|
||||
|
||||
fmt.StartWrite();
|
||||
|
@ -2625,6 +2628,9 @@ error:
|
|||
|
||||
bool RemoteSerializer::FlushLogBuffer(Peer* p)
|
||||
{
|
||||
if ( ! p->logs_requested )
|
||||
return false;
|
||||
|
||||
last_flush = network_time;
|
||||
|
||||
if ( p->state == Peer::CLOSING )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue