Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/rocm/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,13 @@ mod tests {
}
match listener.accept() {
Ok((mut stream, _)) => {
// The listener is non-blocking so the accept loop can
// poll for the stop signal, but on Windows the accepted
// socket inherits that mode and the read below then
// fails with WSAEWOULDBLOCK instead of waiting for the
// request. Put the connection back into blocking mode;
// the read timeout is what bounds it.
stream.set_nonblocking(false)?;
stream.set_read_timeout(Some(Duration::from_secs(2))).ok();
let request = read_http_request(&mut stream)?;
if request.starts_with("GET /v1/models ") {
Expand Down