mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix potential race in openflow broker plugin
Broker::subscribe() after Broker::peer() may result in losing messages, always best to do the reverse order. Also possibly improved chance of unstable unit test output order.
This commit is contained in:
parent
2bb529f5b7
commit
a8c0cd7dee
4 changed files with 10 additions and 5 deletions
|
@ -61,8 +61,8 @@ function broker_flow_clear_fun(state: OpenFlow::ControllerState): bool
|
|||
|
||||
function broker_init(state: OpenFlow::ControllerState)
|
||||
{
|
||||
Broker::peer(cat(state$broker_host), state$broker_port);
|
||||
Broker::subscribe(state$broker_topic); # openflow success and failure events are directly sent back via the other plugin via broker.
|
||||
Broker::peer(cat(state$broker_host), state$broker_port);
|
||||
}
|
||||
|
||||
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue