sub shm CHANGE continue normally on callback timeout
Refs
@@ -1794,7 +1794,7 @@ sr_shmsub_multi_listen_write_event(sr_multi_sub_shm_t *multi_sub_shm, uint32_t v
break;
default:
/* no longer a listener event, we could have timeouted */
- sr_errinfo_new(&err_info, SR_ERR_INTERNAL, NULL, "Unable to finish processing event with ID %u priority %u "
+ sr_errinfo_new(&err_info, SR_ERR_TIME_OUT, NULL, "Unable to finish processing event with ID %u priority %u "
"(timeout probably).", multi_sub_shm->request_id, multi_sub_shm->priority);
return err_info;
}
@@ -2064,7 +2064,7 @@ sr_shmsub_listen_write_event(sr_sub_shm_t *sub_shm, const char *data, uint32_t d
break;
default:
/* no longer a listener event, we could have timeouted */
- sr_errinfo_new(&err_info, SR_ERR_INTERNAL, NULL, "Unable to finish processing event with ID %u (timeout probably).",
+ sr_errinfo_new(&err_info, SR_ERR_TIME_OUT, NULL, "Unable to finish processing event with ID %u (timeout probably).",
sub_shm->request_id);
return err_info;
}
@@ -2839,7 +2839,9 @@ sr_shmsub_listen_thread(void *arg)
while (ATOMIC_LOAD_RELAXED(subs->thread_running)) {
/* process the new event (or subscription stop time has elapsed) */
- if (sr_process_events(subs, NULL, &stop_time_in) != SR_ERR_OK) {
+ ret = sr_process_events(subs, NULL, &stop_time_in);
+ if ((ret != SR_ERR_OK) && (ret != SR_ERR_TIME_OUT)) {
+ /* continue on time out */
goto error;
}
