Skip to content

Commit fca362f

Browse files
authored
Set MQTT connect and receive timeout. (#104)
Setting connect and receive timeouts for faster OTA through newly introduced APIs.
1 parent 3a28dbe commit fca362f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main/networking/mqtt/core_mqtt_agent_manager.c

+3
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ static MQTTStatus_t prvCoreMqttAgentInit( NetworkContext_t * pxNetworkContext )
586586
xTransport.send = espTlsTransportSend;
587587
xTransport.recv = espTlsTransportRecv;
588588

589+
vTlsSetConnectTimeout( 3000 );
590+
vTlsSetRecvTimeout( 100 );
591+
589592
/* Initialize MQTT library. */
590593
xReturn = MQTTAgent_Init( &xGlobalMqttAgentContext,
591594
&xMessageInterface,

0 commit comments

Comments
 (0)