aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-12-06 15:13:41 +0000
committerdiogo464 <[email protected]>2025-12-06 15:13:41 +0000
commit42c899931074fc1a8adcf30e4bd103163ee84b1a (patch)
tree4d488789a18f08f1d57cdd1e11c60bf5cb831635 /src
parent077b4c04d1eba229d2bdd42952f5617966c6b3fe (diff)
Clear socket timeout after successful connection
The timeout is now only applied to the connection attempt itself, allowing MQTT communication to proceed without artificial timeouts during normal operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index abb803f..4e0896c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -997,6 +997,8 @@ pub async fn connect_and_run(
997 continue; 997 continue;
998 } 998 }
999 999
1000 socket.set_timeout(None);
1001
1000 if let Err(err) = device.run(&mut socket).await { 1002 if let Err(err) = device.run(&mut socket).await {
1001 crate::log::error!( 1003 crate::log::error!(
1002 "Device run failed with: {:?}", 1004 "Device run failed with: {:?}",