Closed Nomidia closed 3 years ago
Need to think a little longer on this one.
0x15000011 is STATUS_IOT_FAILED which is very generic and will be returned on issues like bad params as well as network call failures.
Do you want to take a stab at it and send a PR?
I'm afraid I will miss something, I just simply add modified my producer-c like this.
#define STATUS_CURL_OPERATION_TIMEDOUT STATUS_COMMON_PRODUCER_BASE + 0x00000025
if (res != CURLE_OK) {
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
DLOGE("Curl perform failed for url %s with result %s : %s ", url, curl_easy_strerror(res), errorBuffer);
if (res == CURLE_OPERATION_TIMEDOUT) {
CHK(FALSE, STATUS_CURL_OPERATION_TIMEDOUT);
}
CHK(FALSE, STATUS_IOT_FAILED);
}
CHK(IS_RETRIABLE_ERROR(statusCode) || (statusCode == STATUS_CURL_OPERATION_TIMEDOUT), retStatus);
In addition, the error code is defined repeatedly.
I will open it in producer-c.
When there is something wrong with the state machine, continuousRetryStreamErrorReportHandler will be called. It will check whether the statusCode meets the reconnection conditions by IS_RETRIABLE_ERROR. If the check passes, it will reset the stream.
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/e1dd9364c3860f0196cc24a5b815c82076ab8149/src/source/ContinuousRetryStreamCallbacks.c#L284
https://github.com/awslabs/amazon-kinesis-video-streams-pic/blob/3f285bcc2d741f4c53171f7467b85358ca294a40/src/client/include/com/amazonaws/kinesis/video/client/Include.h#L210-L215
But when statusCode is 0x15000011, the state machine will exit. I think this error code should also be allowed to reconnect.
a. Normal
b. Abnormal