Skip to content

Commit

Permalink
♻️ [Test] Added autoreconnect of Kura Device
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Codutti <[email protected]>
  • Loading branch information
Coduz committed Jan 21, 2025
1 parent 4e05b8e commit 7af3921
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ public void mqttClientConnect() {
MqttConnectOptions clientOpts = new MqttConnectOptions();
clientOpts.setUserName(CLIENT_USER);
clientOpts.setPassword(CLIENT_PASSWORD.toCharArray());
clientOpts.setAutomaticReconnect(true);

MqttConnectOptions serverOpts = new MqttConnectOptions();
serverOpts.setUserName(SERVER_USER);
serverOpts.setPassword(SERVER_PASSWORD.toCharArray());
serverOpts.setAutomaticReconnect(true);

try {
mqttClient.connect(clientOpts);
Expand Down

0 comments on commit 7af3921

Please sign in to comment.