Enhance error handling in TestServeSession for interrupted reads

- Updated the error handling logic in the TestServeSession implementation to account for `std::io::ErrorKind::Interrupted`, ensuring that the session can properly retry on interrupted read operations, in addition to handling timeouts and would-block scenarios.
This commit is contained in:
Joe 2026-01-30 11:40:01 -06:00
parent a98d5c6cce
commit 8c6aa36027

View file

@ -216,9 +216,10 @@ impl TestServeSession {
}
Err(hyper_tungstenite::tungstenite::Error::Io(e))
if e.kind() == std::io::ErrorKind::WouldBlock
|| e.kind() == std::io::ErrorKind::TimedOut =>
|| e.kind() == std::io::ErrorKind::TimedOut
|| e.kind() == std::io::ErrorKind::Interrupted =>
{
// No data available yet or read timed out, try again
// No data available yet, read timed out, or interrupted by signal - try again
continue;
}
Err(e) => {