diff --git a/src/protocol/mqtt/client/mqtt_client.c b/src/protocol/mqtt/client/mqtt_client.c index 11a4addbf..83037b71a 100644 --- a/src/protocol/mqtt/client/mqtt_client.c +++ b/src/protocol/mqtt/client/mqtt_client.c @@ -2133,6 +2133,7 @@ RETURN : return rc; } +#define CONFIG_SUBINFO_LIFE (10) /* remove node of list of wait subscribe ACK, which is in invalid state or timeout */ static int MQTTSubInfoProc(iotx_mc_client_t *pClient) @@ -2199,7 +2200,7 @@ static int MQTTSubInfoProc(iotx_mc_client_t *pClient) } /* check the request if timeout or not */ - if (utils_time_spend(&subInfo->sub_start_time) <= (pClient->request_timeout_ms * 5)) { + if (utils_time_spend(&subInfo->sub_start_time) <= (pClient->request_timeout_ms * CONFIG_SUBINFO_LIFE)) { /* continue to check the next node */ continue; }