Immediately apply broker subscriptions made during bro_init()

Otherwise that's begging for unit test failures due to races
This commit is contained in:
Jon Siwek 2018-08-10 17:12:53 -05:00
parent 083947af41
commit 67524f26d5
7 changed files with 24 additions and 5 deletions

View file

@ -261,7 +261,8 @@ export {
global publish_id: function(topic: string, id: string): bool;
## Register interest in all peer event messages that use a certain topic
## prefix.
## prefix. Note that subscriptions may not be altered immediately after
## calling (except during :bro:see:`bro_init`).
##
## topic_prefix: a prefix to match against remote message topics.
## e.g. an empty prefix matches everything and "a" matches
@ -271,6 +272,8 @@ export {
global subscribe: function(topic_prefix: string): bool;
## Unregister interest in all peer event messages that use a topic prefix.
## Note that subscriptions may not be altered immediately after calling
## (except during :bro:see:`bro_init`).
##
## topic_prefix: a prefix previously supplied to a successful call to
## :bro:see:`Broker::subscribe`.