We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f263e88 commit fd891bdCopy full SHA for fd891bd
src/server/client_handle.rs
@@ -28,12 +28,14 @@ pub async fn handle_client(
28
let maybe_request = timeout(config.limits.stall_time, client.receive_request()).await;
29
30
let request = match maybe_request {
31
- // Check if we timed out
32
- Ok(result) => match result {
33
- Ok(req) => req,
34
- Err(other) => return Err(other),
35
- },
36
- Err(_) => {
+ // Successfully received and parsed a request
+ Ok(Ok(req)) => req,
+
+ // An error occured while receiving a request
+ Ok(Err(why)) => return Err(why),
37
+ // Timed out
38
+ Err(..) => {
39
error!("{}: Stalled for too long, kicking", client.id());
40
let _ = client.shutdown(Some(Response::Stalling)).await;
41
return Err(Error::StallTimeExceeded);
0 commit comments