Function anjay_event_loop_run_with_error_handling
Defined in File core.h
Function Documentation
-
int anjay_event_loop_run_with_error_handling(anjay_t *anjay, avs_time_duration_t max_wait_time)
Acts like anjay_event_loop_run, but schedules new activation attempts when all configured LwM2M server connections have failed. Dedicated download sockets are not reconnected by this recovery mechanism.
- Parameters:
anjay – Anjay object to operate on.
max_wait_time – Maximum time to spend in each single call to
poll()orselect(). Larger times will prevent the event loop thread from waking up too frequently. However, during this wait time, the call to anjay_event_loop_interrupt may not be handled immediately, and scheduler jobs requested from other threads (see anjay_get_scheduler) will not be executed, so shortening this time will make the scheduler more responsive.
- Returns:
0 after having been successfully interrupted by anjay_event_loop_interrupt, or a negative value in case of a fatal error.