Skip to content

Commit

Permalink
Set MQTT connect and receive timeout. (#104)
Browse files Browse the repository at this point in the history
Setting connect and receive timeouts for faster OTA through newly introduced APIs.
  • Loading branch information
kvp1703 authored Sep 10, 2024
1 parent 3a28dbe commit fca362f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/networking/mqtt/core_mqtt_agent_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ static MQTTStatus_t prvCoreMqttAgentInit( NetworkContext_t * pxNetworkContext )
xTransport.send = espTlsTransportSend;
xTransport.recv = espTlsTransportRecv;

vTlsSetConnectTimeout( 3000 );
vTlsSetRecvTimeout( 100 );

/* Initialize MQTT library. */
xReturn = MQTTAgent_Init( &xGlobalMqttAgentContext,
&xMessageInterface,
Expand Down

0 comments on commit fca362f

Please sign in to comment.