You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I am using hyper-util auto server. I return an error from service. Instead of sending GOAWAY and closing connection hyper sends RST_STREAM. I looked into documentation and it looks like the connection should closed, but it sends RST.
let mut builder = Builder::new(TokioExecutor::new());;
.............
let service = service_fn(move |request| {
async move {
println!("request");
Err::<Response<String>, &str>("error")
}
}
if let Err(err) = builder.serve_connection(stream, service).await {
println!("{err}")
}
The text was updated successfully, but these errors were encountered:
Ah ok, yea, that's a problem with the docs. They should be updated to say that the behavior depends on the protocol version. It will abort the request however the protocol allows, either with some sort of RST_STREAM, or killing the connection if that doesn't exist.
seanmonstar
changed the title
wrong error handling in service
Documentation for Service::Error behavior should say it is protocol dependent
May 6, 2024
seanmonstar
added
E-easy
Effort: easy. A task that would be a great starting point for a new contributor.
A-docs
Area: documentation.
and removed
C-bug
Category: bug. Something is wrong. This is bad!
labels
May 6, 2024
Version
1.3.1
Platform
Ubuntu 23.10
Description
I am using hyper-util
auto
server. I return an error from service. Instead of sending GOAWAY and closing connection hyper sends RST_STREAM. I looked into documentation and it looks like the connection should closed, but it sends RST.The text was updated successfully, but these errors were encountered: