default to wisp v1

This commit is contained in:
Toshit Chawda 2024-07-18 21:22:35 -07:00
parent d6353bd5a9
commit 2872e02a2c
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 6 additions and 6 deletions

View file

@ -92,9 +92,9 @@ struct Cli {
/// Usernames and passwords are sent in plaintext!!
#[arg(long)]
auth: Option<String>,
/// Make a Wisp V1 connection
/// Make a Wisp V2 connection
#[arg(long)]
wisp_v1: bool,
wisp_v2: bool,
}
#[tokio::main(flavor = "multi_thread")]
@ -166,7 +166,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
extension_ids.push(PasswordProtocolExtension::ID);
}
let (mux, fut) = if opts.wisp_v1 {
let (mux, fut) = if !opts.wisp_v2 {
ClientMux::create(rx, tx, None)
.await?
.with_no_required_extensions()
@ -178,7 +178,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
};
println!(
"connected and created ClientMux, was downgraded {}, extensions supported {:?}",
"connected and created ClientMux, was downgraded {}, extensions supported {:?}\n",
mux.downgraded, mux.supported_extension_ids
);