Skip to content

Commit

Permalink
common UPDATE do not send notifs on slocing sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jun 19, 2024
1 parent f91d7c7 commit 63a87d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ np_ntf_send(struct nc_session *ncs, const struct timespec *timestamp, struct lyd
NC_MSG_TYPE msg_type;
char *datetime = NULL;

if (nc_session_get_status(ncs) != NC_STATUS_RUNNING) {
/* is being closed */
goto cleanup;
}

/* create the notification object, all the passed arguments must exist until it is sent */
ly_time_ts2str(timestamp, &datetime);
if (use_ntf) {
Expand Down

0 comments on commit 63a87d9

Please sign in to comment.