mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Avoid race conditions in broker.ssl-mismatch test
This commit is contained in:
parent
d957f883df
commit
d3ad3c618a
4 changed files with 51 additions and 8 deletions
|
@ -582,6 +582,22 @@ void Manager::Peer(const string& addr, uint16_t port, double retry)
|
|||
iosource_mgr->Register(this, false);
|
||||
}
|
||||
|
||||
void Manager::PeerNoRetry(const string& addr, uint16_t port)
|
||||
{
|
||||
if ( bstate->endpoint.is_shutdown() )
|
||||
return;
|
||||
|
||||
DBG_LOG(DBG_BROKER, "Starting to peer with %s:%" PRIu16 " (no retry)", addr.c_str(), port);
|
||||
|
||||
bstate->endpoint.peer_nosync(addr, port, broker::timeout::seconds{0});
|
||||
|
||||
auto counts_as_iosource = get_option("Broker::peer_counts_as_iosource")->AsBool();
|
||||
|
||||
if ( counts_as_iosource )
|
||||
// Register as a "does-count" source now.
|
||||
iosource_mgr->Register(this, false);
|
||||
}
|
||||
|
||||
void Manager::Unpeer(const string& addr, uint16_t port)
|
||||
{
|
||||
if ( bstate->endpoint.is_shutdown() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue