diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /tests/support/mod.rs | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'tests/support/mod.rs')
| -rw-r--r-- | tests/support/mod.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/support/mod.rs b/tests/support/mod.rs index f4ccebe8..cc29afe9 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -444,9 +444,13 @@ pub fn wait_for_message_variants( timeout: Duration, variants: &[u32], ) -> Result<bool, String> { - stream - .set_read_timeout(Some(Duration::from_millis(200))) - .map_err(|e| e.to_string())?; + let read_timeout = Some(Duration::from_millis(200)); + // Darwin can reject resetting the timeout after peer closure with queued data. + if stream.read_timeout().map_err(|e| e.to_string())? != read_timeout { + stream + .set_read_timeout(read_timeout) + .map_err(|e| e.to_string())?; + } let deadline = Instant::now() + timeout; while Instant::now() < deadline { match read_server_message(stream) { |
