mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-18 13:41:34 +02:00
test(rust): remove TCP timing dependence from chunked fixture
This commit is contained in:
1 parent
ef903248c0
commit
879e86b20e
1 file changed
+3
@@ -33,6 +33,9 @@ fn respond(stream: &mut TcpStream, head: &str, body: &[u8]) -> std::io::Result<(
|
||||
/// Serves byte ranges over keep-alive HTTP/1.1. `/busy` answers the first
|
||||
/// ranged chunk (after the two-byte probe) with a small retryable 503 body.
|
||||
fn connection(mut stream: TcpStream, stop: &AtomicBool, busy: &AtomicBool) {
|
||||
// Keep the fixture's 3 ms body delay independent of Nagle/delayed ACK,
|
||||
// which can exceed the client's bounded drain on Linux runners.
|
||||
stream.set_nodelay(true).unwrap();
|
||||
stream
|
||||
.set_read_timeout(Some(Duration::from_millis(25)))
|
||||
.unwrap();
|
||||
|
||||
Reference in new issue
Block a user