Skip to content

Commit

Permalink
Move atomic earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Jul 31, 2024
1 parent 8a5ac4c commit ef627bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/legacy_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ fn capture_connection_on_client() {
assert!(captured_conn.connection_metadata().is_some());
}

#[cfg(not(miri))]
#[test]
fn connection_poisoning() {
use std::sync::atomic::AtomicUsize;
Expand Down Expand Up @@ -938,9 +937,9 @@ fn connection_poisoning() {
let mut buf = [0; 4096];
loop {
if sock.read(&mut buf).expect("read 1") > 0 {
num_requests_tracker.fetch_add(1, Ordering::Relaxed);
sock.write_all(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")
.expect("write 1");
num_requests_tracker.fetch_add(1, Ordering::Relaxed);
}
}
});
Expand Down

0 comments on commit ef627bf

Please sign in to comment.