@@ -394,7 +394,7 @@ pub fn send_request(
394
394
// ProtocolFamily messages from a Read, and write them to a Write. The Read + Write is
395
395
// (usually) a non-blocking socket; the network connection deals with EWOULDBLOCK internally,
396
396
// as well as underfull socket buffers.
397
- //
397
+ //
398
398
// Third, we need to _drive_ data to the socket. We have to repeatedly (1) flush the network
399
399
// handle (which contains the buffered bytes from the message to be fed into the socket), and
400
400
// (2) drive bytes from the handle into the socket iself via the network connection. This is a
@@ -450,9 +450,12 @@ pub fn send_request(
450
450
if flushed && num_sent == 0 {
451
451
break ;
452
452
}
453
-
453
+
454
454
if Instant :: now ( ) . saturating_duration_since ( start) > timeout {
455
- return Err ( io:: Error :: new ( io:: ErrorKind :: WouldBlock , "Timed out while receiving request" ) ) ;
455
+ return Err ( io:: Error :: new (
456
+ io:: ErrorKind :: WouldBlock ,
457
+ "Timed out while receiving request" ,
458
+ ) ) ;
456
459
}
457
460
}
458
461
@@ -497,7 +500,10 @@ pub fn send_request(
497
500
request_handle = rh;
498
501
499
502
if Instant :: now ( ) . saturating_duration_since ( start) > timeout {
500
- return Err ( io:: Error :: new ( io:: ErrorKind :: WouldBlock , "Timed out while receiving request" ) ) ;
503
+ return Err ( io:: Error :: new (
504
+ io:: ErrorKind :: WouldBlock ,
505
+ "Timed out while receiving request" ,
506
+ ) ) ;
501
507
}
502
508
}
503
509
@@ -1952,7 +1958,7 @@ mod test {
1952
1958
client_done_signal
1953
1959
. recv ( )
1954
1960
. expect ( "Failed to receive client done signal" ) ;
1955
-
1961
+
1956
1962
// Explicitly drop the stream after signaling to ensure the client finishes
1957
1963
// NOTE: this will cause the test to slow down, since `send_request` expects
1958
1964
// `Connection: close`
0 commit comments