Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions crates/fbuild-cli/src/cli/port_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,18 @@ mod tests {
while request_count < 2 {
match listener.accept() {
Ok((mut stream, _)) => {
// Windows hands back an accepted socket that inherits
// the listener's non-blocking mode, unlike Unix. The
// read below then returns WSAEWOULDBLOCK (os error
// 10035) whenever the client's bytes have not landed
// yet, and `unwrap` turns that into a flaky failure
// that looks nothing like a socket-mode problem.
// FastLED/fbuild#1349 CI run 32658416728 hit it; the
// mock daemon in `test_emu_exit_code.rs` already
// guards the same way.
stream
.set_nonblocking(false)
.expect("accepted socket must block for the exchange below");
let mut request = [0_u8; 1024];
let _ = stream.read(&mut request).unwrap();
request_count += 1;
Expand Down
12 changes: 12 additions & 0 deletions crates/fbuild-core/src/usb/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,18 @@ mod tests {
while request_count < 2 {
match listener.accept() {
Ok((mut stream, _)) => {
// Windows hands back an accepted socket that inherits
// the listener's non-blocking mode, unlike Unix. The
// read below then returns WSAEWOULDBLOCK (os error
// 10035) whenever the client's bytes have not landed
// yet, and `unwrap` turns that into a flaky failure
// that looks nothing like a socket-mode problem.
// FastLED/fbuild#1349 CI run 32658416728 hit it; the
// mock daemon in `test_emu_exit_code.rs` already
// guards the same way.
stream
.set_nonblocking(false)
.expect("accepted socket must block for the exchange below");
let mut buf = [0_u8; 1024];
let _ = stream.read(&mut buf).unwrap();
request_count += 1;
Expand Down
Loading