Comments (4)
It looks like my particular issue may be a little different than described. I was definitely seeing "timeout: no recent network activity" in my logs, which is why I thought quic.IdleTimeoutError
may be to blame.
However, it looks like the actual error that a client is much more likely to receive is an http3.Error
with a code of H3_REQUEST_CANCELLED
. With quic.IdleTimeoutError
, my work-around was check for instances of net.Error
where err.Timeout()
returned true. But with this latest observation, I must put work-around code that is quite bespoke to this library to properly detect context-related errors. I suspect an appropriate improvement would not involve touching http3.Error
but instead something else in the round-tripper so that it can correctly return context.Canceled
or context.DeadlineExceeded
when an http3.Error
is triggered via the context.
from quic-go.
I'm not sure I understand under which condition exactly you expect the context cancelation error.
In general, an idle timeout can occur at any time during the handshake or the connection, if the other peer suddenly goes away without telling us. There's no context being canceled here, so we shouldn't return a context cancelation error.
Am I right to assume that you're setting the context on the http.Request
, cancel that context, and now expect the error on RoundTripper.RoundTrip
to be a context cancelation error? Is that what HTTP/2 does? Assuming that's the case, I agree that this would be the correct behavior, and we should make sure that HTTP/3 does the same (I haven't checked what it does right now).
from quic-go.
Am I right to assume that you're setting the context on the
http.Request
, cancel that context, and now expect the error onRoundTripper.RoundTrip
to be a context cancelation error?
Yes. That is what the standard lib net/http
stuff does, with the exception of the bug I linked above, where the dial operation (when no existing connection is in the pool) can instead return os. ErrDeadlineExceeded
.
For the case of the error I'm seeing, I think the HTTP/3 round tripper implementation could examine the http.Error
and the request's context and then massage the error to wrap the error and return something that is easier to inspect.
from quic-go.
Closing in favor of #4205.
from quic-go.
Related Issues (20)
- Path MTU Discovery is highly affected by packet loss HOT 5
- The method `ListenAndServe` in package `http3` is not compatible with `http` HOT 4
- improve WASM support
- quic-go.newStream high memory usage HOT 7
- http3: response body not implemented http3.HTTPStreamer HOT 9
- Datagram no recent network activity error HOT 3
- bug: unable to connect to quiche servers HOT 5
- In some cases I have turned off Stream on the server side, but OpenStreamSync on the client side is still blocked HOT 6
- pass a context to ConnContext context, cancel it when the connection is closed
- Slow transfer speed HOT 10
- Wrong ACK numbers? HOT 1
- gquic branch usage HOT 1
- Go 1.21
- server incorrectly allows 0-RTT with reduced limits when using tls.Config.GetConfigForClient
- introduce a minimum step size of Path MTU Discovery
- Allow applications to specify MaxPacketBufferSize HOT 8
- add more metrics
- Significant Packet Delay with quic-go on iOS Due to Goroutine Handling HOT 3
- http3: RoundTripper is caching dialErr since v0.43.0 HOT 1
- Cancel retransmission of data when sending with quic Client HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quic-go.