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

reattempt connect if failed during init connect #729

Conversation

Lederstrumpf
Copy link
Member

PeerConnection::connect_brontozaur(local_node, remote_node)
.expect("Unable to connect to the remote peer")

let mut connection = PeerConnection::connect_brontozaur(local_node, remote_node);
Copy link
Member

@TheCharlatan TheCharlatan Oct 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hard idea to realize. The way the patch is right now, the user will never understand what is going on when the connection is failing in the cli, or a future gui, and has to look at the logs for diagnostics. If you fail seconds later, the farcaster daemon will never report the failure either and expect the connection to come up eventually, because it expects the connection to be up within 1 second. If you move this to the farcaster call site, you add further dependence on the delay introduced for waiting on the connection.

I think the right thing to do here is refactor peerd to launch its internal zmq runtime no matter what and independently manage its remote session from within its runtime. Then it can send errors directly to farcasterd.

@TheCharlatan
Copy link
Member

Closing this in favor of #792 - a failed to connect is now cleanly aborts taking a swap with an error message to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

taker peerd panics if maker peerd times out during connection setup
2 participants