|
|
@@ -119,13 +119,13 @@ pub async fn auth(
|
|
|
} else{
|
|
|
if let Some(mq) = state.mq_detail{
|
|
|
if let Err(e)=mq.db_mq_map.execute(
|
|
|
- "insert into pub (clientid,topic,deadline)values(?,?,unixepoch()+300),(?,?,unixepoch()+300)",
|
|
|
+ "insert into pub (clientid,topic,deadline)values(?,?,unixepoch()+9223372036854775807),(?,?,unixepoch()+9223372036854775807)",
|
|
|
(mqid.clone(),format!("{}/cmd",sn),mqid.clone(),format!("/wf/Iot/device/{sn}"))).await{
|
|
|
log(Warning, format!("on register with device: {e}"));
|
|
|
};
|
|
|
|
|
|
if let Err(e)=mq.db_mq_map.execute(
|
|
|
- "insert into sub (clientid,topic,deadline)values(?,?,unixepoch()+300)",
|
|
|
+ "insert into sub (clientid,topic,deadline)values(?,?,unixepoch()+9223372036854775807)",
|
|
|
(mqid.clone(),format!("{}/state",sn),mqid.clone(),format!("/wf/Iot/client/{sn}"))).await{
|
|
|
log(Warning, format!("on register with device: {e}"));
|
|
|
};
|
|
|
@@ -190,13 +190,13 @@ pub async fn auth(
|
|
|
};
|
|
|
if let Some(mq) = state.mq_detail{
|
|
|
if let Err(e)=mq.db_mq_map.execute(
|
|
|
- "insert into pub (clientid,topic,deadline)values(?,?,unixepoch()+300),(?,?,unixepoch()+300)",
|
|
|
+ "insert into pub (clientid,topic,deadline)values(?,?,unixepoch()+9223372036854775807),(?,?,unixepoch()+9223372036854775807)",
|
|
|
(mqid.clone(),format!("{}/cmd",sn),mqid.clone(),format!("/wf/Iot/device/{sn}"))).await{
|
|
|
log(Warning, format!("on register with device: {e}"));
|
|
|
};
|
|
|
|
|
|
if let Err(e)=mq.db_mq_map.execute(
|
|
|
- "insert into sub (clientid,topic,deadline)values(?,?,unixepoch()+300)",
|
|
|
+ "insert into sub (clientid,topic,deadline)values(?,?,unixepoch()+9223372036854775807)",
|
|
|
(mqid.clone(),format!("{}/state",sn),mqid.clone(),format!("/wf/Iot/client/{sn}"))).await{
|
|
|
log(Warning, format!("on register with device: {e}"));
|
|
|
};
|