mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-01-18 18:46:24 +00:00
Add missing re-connect config in mqtt connection options.
This commit is contained in:
parent
0d4003a2be
commit
9ecfbab5b5
@ -1,4 +1,5 @@
|
||||
use std::io::Cursor;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
@ -93,6 +94,7 @@ impl<'a> MqttBackend<'a> {
|
||||
|
||||
// connection options
|
||||
let mut conn_opts_b = mqtt::ConnectOptionsBuilder::new();
|
||||
conn_opts_b.automatic_reconnect(Duration::from_secs(1), Duration::from_secs(30));
|
||||
conn_opts_b.clean_session(conf.clean_session);
|
||||
conn_opts_b.user_name(&conf.username);
|
||||
conn_opts_b.password(&conf.password);
|
||||
|
@ -1,5 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
use std::io::Cursor;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
@ -66,6 +67,7 @@ impl<'a> Integration<'a> {
|
||||
|
||||
// connection options
|
||||
let mut conn_opts_b = mqtt::ConnectOptionsBuilder::new();
|
||||
conn_opts_b.automatic_reconnect(Duration::from_secs(1), Duration::from_secs(30));
|
||||
conn_opts_b.clean_session(conf.clean_session);
|
||||
conn_opts_b.user_name(&conf.username);
|
||||
conn_opts_b.password(&conf.password);
|
||||
|
Loading…
Reference in New Issue
Block a user