Skip to content
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

feat(relay): propagate errors to Transport::{listen_on,dial} #4745

Merged
merged 32 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ed10848
Forward errors to `dial` and `listen_on`
thomaseizinger Oct 27, 2023
b457a93
Remove unused `PeerId`
thomaseizinger Oct 27, 2023
516e37c
Add docs
thomaseizinger Oct 27, 2023
d85d918
Remove old TODO
thomaseizinger Oct 27, 2023
ed21877
Further propagate rename
thomaseizinger Oct 27, 2023
6efa8af
Use shorthand
thomaseizinger Oct 27, 2023
ef5a3d5
Add debug-asserts for internal state
thomaseizinger Oct 27, 2023
7c74072
Remove unused event
thomaseizinger Oct 27, 2023
8687543
Don't report errors from inbound circuits
thomaseizinger Oct 27, 2023
1de8be3
Add test for `dial`
thomaseizinger Oct 27, 2023
c78b44d
Add changelog entry
thomaseizinger Oct 27, 2023
0594ea0
Update changelog
thomaseizinger Oct 27, 2023
891f96d
Add sentence regarding connection closing
thomaseizinger Oct 27, 2023
5c7407c
Update misc/futures-bounded/CHANGELOG.md
thomaseizinger Oct 27, 2023
c535fc4
Use if let
thomaseizinger Oct 27, 2023
ef84668
Update hole-punch tests to use new errors
thomaseizinger Oct 27, 2023
c15b49e
Merge remote-tracking branch 'origin/refactor/relay-client-error' int…
thomaseizinger Oct 27, 2023
e898ba0
Fix rustdoc link
thomaseizinger Oct 27, 2023
1c260d9
Fix clippy warning
thomaseizinger Oct 27, 2023
b1566b3
Merge branch 'master' into refactor/relay-client-error
thomaseizinger Oct 27, 2023
badda20
Merge branch 'master' into refactor/relay-client-error
thomaseizinger Oct 27, 2023
69a068a
Update protocols/relay/CHANGELOG.md
thomaseizinger Oct 30, 2023
cc888b6
Rename field
thomaseizinger Oct 31, 2023
2750ea5
Remove quasi-unbounded channel in favor of `try_send` + `log` + large
thomaseizinger Oct 31, 2023
f381b33
Replace many loops with one
thomaseizinger Oct 31, 2023
667d4c4
Ensure we always continue polling
thomaseizinger Oct 31, 2023
e394c38
Merge branch 'master' into refactor/relay-client-error
thomaseizinger Oct 31, 2023
02ae398
Rename field
thomaseizinger Oct 31, 2023
ce2a6a6
Remove unused `pending_error` field
thomaseizinger Oct 31, 2023
77f49c5
Log error if listener for new circuit is gone
thomaseizinger Oct 31, 2023
6233e9d
Merge branch 'master' into refactor/relay-client-error
mergify[bot] Oct 31, 2023
10d3f02
Merge branch 'master' into refactor/relay-client-error
thomaseizinger Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Log error if listener for new circuit is gone
thomaseizinger committed Oct 31, 2023
commit 77f49c5bd97b7b0a4908c13f772e14da77d106d8
15 changes: 11 additions & 4 deletions protocols/relay/src/priv_client/handler.rs
Original file line number Diff line number Diff line change
@@ -364,10 +364,17 @@ impl ConnectionHandler for Handler {
.pop_front()
.expect("must have active request for stream");

// TODO: What do we on error?
let _ = to_listener.send(Ok(priv_client::Connection {
state: priv_client::ConnectionState::new_outbound(stream, read_buffer),
}));
if to_listener
.send(Ok(priv_client::Connection {
state: priv_client::ConnectionState::new_outbound(stream, read_buffer),
}))
.is_err()
{
log::debug!(
"Dropping newly established circuit because the listener is gone"
);
continue;
}

return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(
Event::OutboundCircuitEstablished { limit },