Skip to content

Commit

Permalink
Add message for the '--as-gateway' option
Browse files Browse the repository at this point in the history
  • Loading branch information
yuezk committed Apr 6, 2024
1 parent e9cb253 commit 879b977
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/gpclient/src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,15 @@ impl<'a> ConnectHandler<'a> {
info!("Failed to connect portal with prelogin: {}", err);
if err.root_cause().downcast_ref::<PortalError>().is_some() {
info!("Trying the gateway authentication workflow...");
return self.connect_gateway_with_prelogin(server).await;
}
self.connect_gateway_with_prelogin(server).await?;

eprintln!("\nNOTE: the server may be a gateway, not a portal.");
eprintln!("NOTE: try to use the `--as-gateway` option if you were authenticated twice.");

Err(err)
Ok(())
} else {
Err(err)
}
}

async fn connect_portal_with_prelogin(&self, portal: &str) -> anyhow::Result<()> {
Expand Down

0 comments on commit 879b977

Please sign in to comment.