diff options
| author | diogo464 <[email protected]> | 2025-12-06 15:13:41 +0000 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-12-06 15:13:41 +0000 |
| commit | 42c899931074fc1a8adcf30e4bd103163ee84b1a (patch) | |
| tree | 4d488789a18f08f1d57cdd1e11c60bf5cb831635 /src | |
| parent | 077b4c04d1eba229d2bdd42952f5617966c6b3fe (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.rs | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -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: {:?}", |
