Skip to content

Commit

Permalink
Avoid duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jan 28, 2025
1 parent 5bac814 commit 02ff9e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/net/matching.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ static void _z_matching_listener_callback(const _z_interest_msg_t *msg, void *ar
switch (msg->type) {
case _Z_INTEREST_MSG_TYPE_DECL_SUBSCRIBER:
case _Z_INTEREST_MSG_TYPE_DECL_QUERYABLE: {
ctx->decl_id = msg->id;
z_matching_status_t status = {.matching = true};
z_closure_matching_status_call(&ctx->callback, &status);
if (ctx->decl_id == 0) {
ctx->decl_id = msg->id;
z_matching_status_t status = {.matching = true};
z_closure_matching_status_call(&ctx->callback, &status);
}
break;
}

Expand Down

0 comments on commit 02ff9e9

Please sign in to comment.