Describe the bug
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.
In some scenarios, when state machine returns 0x15000011, actually it does not happend.
Scenario 1:
The describStream returns 52000011
ResetStream is called
In client state machine, expiration is reached, attempt to get a new expiration time, but timed out. return 0x15000011
9:18:12 2021-01-06 11:18:13 WARN curlCompleteSync(): curl perform failed for url https://s-703775db.kinesisvideo.ap-south-1.amazonaws.com/putMedia with result Timeout was reached: Resolving timed out after 5599 milliseconds
19:18:12 2021-01-06 11:18:13 WARN curlCompleteSync(): pCurlResponse->callInfo.httpStatus=0
19:18:12 2021-01-06 11:18:13 WARN curlCompleteSync(): HTTP Error 0 : Response: (null)
19:18:16 2021-01-06 11:18:17 ERROR blockingCurlCall(): Curl perform failed for url https://c3qp4tl980s52m.credentials.iot.ap-south-1.amazonaws.com/role-aliases/dev-kvs-access-role-alias/credentials with result Timeout was reached : Resolving timed out after 3575 milliseconds
19:18:16 2021-01-06 11:18:17 WARN stepStateMachine(): pStateMachine=d88c64,end. retStatus=15000011.
19:18:16 2021-01-06 11:18:17 WARN executePutStreamState(): ---- Leave retStatus=15000011.
19:18:16
19:18:16 2021-01-06 11:18:17 WARN stepStateMachine(): pStateMachine=d5931c,end. retStatus=15000011.
19:18:16 2021-01-06 11:18:17 WARN executeReadyStreamState(): ---- Leave retStatus=15000011.
19:18:16
19:18:16 2021-01-06 11:18:17 WARN stepStateMachine(): pStateMachine=d5931c,end. retStatus=15000011.
19:18:16 2021-01-06 11:18:17 WARN executeStoppedStreamState(): ---- Leave retStatus=15000011.
19:18:16
19:18:16 2021-01-06 11:18:17 WARN stepStateMachine(): pStateMachine=d5931c,end. retStatus=15000011.
19:18:16 2021-01-06 11:18:17 ERROR kinesisVideoStreamTerminated(): operation returned status code: 0x15000011
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
All of the 0x15000011 is caused by Timeout. In this case, I think it should retry.
I simply modified my locak code like this.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In addition, there are mutiple upload handle at the same time, I'm not sure if it is a issue.
Describe the bug 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. In some scenarios, when state machine returns 0x15000011, actually it does not happend.
Scenario 1:
Scenario 2:
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/e1dd9364c3860f0196cc24a5b815c82076ab8149/src/source/CurlApiCallbacks.c#L2231-L2240
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ All of the 0x15000011 is caused by Timeout. In this case, I think it should retry. I simply modified my locak code like this.
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/include/com/amazonaws/kinesis/video/common/Include.h#L52
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/source/Common/Curl/CurlCall.c#L79-L83
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/source/ContinuousRetryStreamCallbacks.c#L296
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/source/CurlApiCallbacks.c#L2235
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ In addition, there are mutiple upload handle at the same time, I'm not sure if it is a issue.
And error codes are defined repeatedly. https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/include/com/amazonaws/kinesis/video/common/Include.h#L47-L48
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/7923ac0f939af86e60cbbba162d96282761ae7ff/src/include/com/amazonaws/kinesis/video/cproducer/Include.h#L43-L44