-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quic: returning ListenerClosed on connection closed internally #4588
Comments
I think this is what is currently happening, right? We call rust-libp2p/transports/quic/src/transport.rs Lines 485 to 502 in 399eaa3
This is then returned and eventually we return rust-libp2p/transports/quic/src/transport.rs Lines 563 to 568 in 399eaa3
We might want to use a different reason though. I'd assume that |
Yeah but we still send |
But It sounds to me like the other transports would need to be changed here and not quic. Or am I misunderstanding something? |
indeed Thomas, thanks for pointing it out.
The thing is, other transports don't return What you wrote regarding the reason makes sense to me, so if you agree I can submit a PR that changes |
Yeah, I can't see any issue with that. Annoyingly, we don't know why the endpoint has been closed otherwise we could make it conditional on that. |
instead of Err(Error::EndpointDriverCrashed) when Accept returns None. Addresses libp2p#4588
submitted quinn-rs/quinn#1676 |
Closes quinn's `Endpoint` with `Ok(())` when `Accept` returns `None`. Resolves: #4588. Related: quinn-rs/quinn#1676. Pull-Request: #4621.
Current behaviour
In lighthouse while trying to shutdown the client, SwarmEvent::Listenerclosed was returned and logged:
In the
quic
transport, when polling theListener
:rust-libp2p/transports/quic/src/transport.rs
Lines 573 to 595 in 399eaa3
as
quinn
(unlike tokio'sTcpStream
which cannot be closed)Accept
Future
impl isOption
, it yieldsNone
when the endpoint has been closed andquic::Transport
returnsSwarmEvent::ListenerClosed
.This is different from the other transports, namely
tcp
which only returnsSwarmEvent::ListenerClosed
whenTransport::remove_listener
is called.Possible Solution
Can we not send
SwarmEvent::ListenerClosed
whenAccept
returnsNone
and just returnPoll::Ready(None)
to match other transports? @kpp what was the reason for consideringAccept
returningNone
aEndpointDriverCrashed
?thanks
Version
Would you like to work on fixing this bug?
Yes
The text was updated successfully, but these errors were encountered: