Skip to content

Commit

Permalink
Fixes #376 - Per kgiusti request, invoke an initial watch callback at…
Browse files Browse the repository at this point in the history
… start of watch.
  • Loading branch information
ted-ross committed Apr 27, 2022
1 parent 86dd5af commit 5d181a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/router_core/address_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,15 @@ static void qdr_core_watch_address_CT(qdr_core_t *core, qdr_action_t *action, bo
addr->watch = watch;
addr->ref_count++;

//
// Raise a core event to notify interested parties that this address is being watched.
//
qdrc_event_addr_raise(core, QDRC_EVENT_ADDR_WATCH_ON, addr);

//
// Trigger a watch callback for an initial snapshot.
//
qdr_trigger_address_watch_CT(core, addr);
} else {
qd_log(core->log, QD_LOG_CRITICAL, "Multiple watches established for the same address, later watches ignored.");
}
Expand Down

0 comments on commit 5d181a5

Please sign in to comment.