Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
Add a keep alive
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Albisson authored and Damien Albisson committed Jun 21, 2024
1 parent 987cc7e commit 7c696b2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/pages/after_setup_pages/home/mqtt_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,7 @@ class _MqttConnectionFormState extends State<MqttConnectionForm> {
_client = MqttServerClient.withPort(
host, clientId, port);
_client.setProtocolV311();

// final MqttConnectMessage connMess = MqttConnectMessage()
// .withClientIdentifier(client_id)
// .startClean() // Non persistent session for MQTT 4.1
// .withWillQos(MqttQos.atLeastOnce);
// _client.connectionMessage = connMess;

_client.setProtocolV311();
// _client.setProtocolV31();
_client.keepAlivePeriod = 20;

await _client.connect();

Expand Down

0 comments on commit 7c696b2

Please sign in to comment.