static void on_io_error()

in src/uhttp.c [839:856]


static void on_io_error(void* context)
{
    /* Codes_SRS_UHTTP_07_050: [ if context is NULL on_io_error shall do nothing. ] */
    if (context != NULL)
    {
        HTTP_CLIENT_HANDLE_DATA* http_data = (HTTP_CLIENT_HANDLE_DATA*)context;
        /* Codes_SRS_UHTTP_07_051: [ if on_error callback is not NULL, on_io_error shall call on_error callback. ] */
        if (http_data->on_error)
        {
            http_data->on_error(http_data->error_user_ctx, HTTP_CALLBACK_REASON_ERROR);
        }
        http_data->connected = 0;
    }
    else
    {
        LogError("Context on_io_error is NULL");
    }
}