Skip to content

Commit

Permalink
[mqtt] extend subinfo record lifetime to 20 seconds for OTA and etc
Browse files Browse the repository at this point in the history
Signed-off-by: Yang, Xiao <yusheng.yx@alibaba-inc.com>
  • Loading branch information
Yang, Xiao committed Aug 7, 2018
1 parent 4a02b2a commit 242d6a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/protocol/mqtt/client/mqtt_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 242d6a9

Please sign in to comment.