Skip to content

Commit a611aaf

Browse files
author
Alex J Lennon
committed
fix: Increase timeout for board shutdown command
- Increase timeout from 500ms to 2000ms for board power commands - This gives the PMU enough time to complete the full shutdown sequence - Prevents CLI from timing out before shutdown completes
1 parent 62e52a7 commit a611aaf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/serial/connection.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ impl Connection {
148148
stream.write_all(command_with_newline.as_bytes()).await?;
149149
stream.flush().await?;
150150

151-
// Use a very short timeout (500ms) for commands that may cause connection loss
152-
let short_timeout = Duration::from_millis(500);
151+
// Use a longer timeout (2000ms) for commands that may cause connection loss
152+
// This gives the board enough time to complete shutdown sequence before connection is lost
153+
let short_timeout = Duration::from_millis(2000);
153154
let response = timeout(short_timeout, async {
154155
let mut buffer = Vec::new();
155156
let mut temp_buf = [0u8; 1024];

0 commit comments

Comments
 (0)