Skip to content

Commit 2a30583

Browse files
Introduce user defined MQTT keep alive value (#73)
`MQTT_KEEP_ALIVE_INTERVAL_SECONDS` macro value depends on the responsiveness of the target running the tests because some targets might be faster or slower than others. Hence, it would be useful to have a default value for this macro (5) and the integration code can provide other value if needed. Signed-off-by: Ahmed Ismail <[email protected] Signed-off-by: Ahmed Ismail <[email protected] Co-authored-by: Ahmed Ismail <[email protected]>
1 parent 0a0a921 commit 2a30583

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mqtt/mqtt_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@
170170
* @brief Time interval in seconds at which an MQTT PINGREQ need to be sent to
171171
* broker.
172172
*/
173-
#define MQTT_KEEP_ALIVE_INTERVAL_SECONDS ( 5U )
173+
#ifndef MQTT_KEEP_ALIVE_INTERVAL_SECONDS
174+
#define MQTT_KEEP_ALIVE_INTERVAL_SECONDS ( 5U )
175+
#endif
174176

175177
/**
176178
* @brief The MQTT message published in this example.

0 commit comments

Comments
 (0)