Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
renukamanavalan committed Jul 13, 2022
1 parent 13a7f47 commit 91d7633
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/sonic-eventd/src/eventd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ capture_service::do_capture()

cap_state_t cap_state = CAP_STATE_INIT;

/*
* Need subscription for publishers to publish. Start one.
* As we are reading off of capture socket, we don't read from
* this handle. Not reading is a not a concern, as zmq will cache
* few initial messages and rest it will drop.
*/
subs_handle = events_init_subscriber();
RET_ON_ERR(subs_handle != NULL, "failed to subscribe to all");

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-eventd/tests/eventd_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ TEST(eventd, capture)

/* Run subscriber; Else publisher will drop events on floor, with no subscriber. */
thread thr_sub(&run_sub, zctx, ref(term_sub), ref(sub_source), ref(sub_evts), ref(sub_evts_sz));

/* Create capture service */
capture_service *pcap = new capture_service(zctx, cache_max);

Expand Down

0 comments on commit 91d7633

Please sign in to comment.