-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Client#connect_relay returns Ok for a nonexistent relay #624
Comments
I can't reproduce it. I receive |
Example: use nostr_sdk::prelude::*;
#[tokio::main]
async fn main() {
let client = Client::new(Keys::generate());
let result = client.add_relay("ws://localhost:3333").await;
println!("{:?}", result);
let result = client.connect_relay("ws://localhost:3333").await;
println!("{:?}", result);
} Running |
You are adding it with |
How can I add it thus that I get an error if the connection fails? |
Ah ok, now I've understood. It try to establish connection in another thread and automatically reconnect. I can consider adding a |
TODO: description Closes #624 Signed-off-by: Yuki Kishimoto <[email protected]>
TODO: description Closes #624 Signed-off-by: Yuki Kishimoto <[email protected]>
TODO: description Closes #624 Signed-off-by: Yuki Kishimoto <[email protected]>
TODO: description Closes #624 Signed-off-by: Yuki Kishimoto <[email protected]>
Closes #624 Signed-off-by: Yuki Kishimoto <[email protected]>
Describe the bug
When I call
connect_relay
for a relay that does not exist such asws://localhost:1234
, I get OkExpected behavior
I get an Error
Build environment
The text was updated successfully, but these errors were encountered: