Skip to content

Commit

Permalink
Set keepalive in GG discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Sep 10, 2024
1 parent 633ec6f commit f80b370
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/greengrass/basic_discovery/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ std::shared_ptr<Mqtt::MqttConnection> getMqttConnection(
.WithPortOverride(connectivityInfo.Port.value())
.WithEndpoint(connectivityInfo.HostAddress.value())
.WithTcpConnectTimeout(3000)
.WithTcpKeepAliveInterval(2)
.WithTcpKeepAliveTimeout(2)
.WithTcpKeepAlive()
.Build());

if (!connection)
Expand Down

0 comments on commit f80b370

Please sign in to comment.