You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My suggestion would be to sth simpler like this. Instead of trying to split the string.
// Needs to be of format <host_name>:<port>
let mut addr = match after_auth.to_socket_addrs() {
Ok(addr) => addr,
Err(_) => {
// Try to add fallback port
format!("{}:{}", after_auth, fallback_port).to_socket_addrs()?
}
};
The text was updated successfully, but these errors were encountered:
This seems like it'd be worth a shot. I seem to remember trying this a long time ago and finding that passing strings directly to to_socket_addrs didn't work for some reason.
https://github.com/apoelstra/rust-jsonrpc/blob/master/src/simple_http.rs#L302
Url parsing currently fails for IPv6 addresses.
My suggestion would be to sth simpler like this. Instead of trying to split the string.
The text was updated successfully, but these errors were encountered: