mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-25 13:31:37 +00:00
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:
parent
a98d5c6cce
commit
8c6aa36027
1 changed files with 3 additions and 2 deletions
|
|
@ -216,9 +216,10 @@ impl TestServeSession {
|
||||||
}
|
}
|
||||||
Err(hyper_tungstenite::tungstenite::Error::Io(e))
|
Err(hyper_tungstenite::tungstenite::Error::Io(e))
|
||||||
if e.kind() == std::io::ErrorKind::WouldBlock
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue