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)
Act same as anjay_event_loop_run, but when none of the configured servers could be reached, try to reconnect using function anjay_transport_schedule_reconnect.
- 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.