mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-17 13:46:27 -05:00
Fix gpclient disconnect bailing with client is already running (#542)
The command `gpclient disconnect` should disconnect an already running gpclient connection, but instead bails with `client is already running`. The client is expected to be running since the desired behavior is to disconnect an existing connection. Fix the CLI run logic to not bail when the client is already running and a disconnect operation is in progress. Fixes #533
This commit is contained in:
1 parent
2aa875a626
commit
a9d2de06b5
1 file changed
+1
-1
@@ -111,7 +111,7 @@ impl Cli {
|
||||
|
||||
async fn run(&self) -> anyhow::Result<()> {
|
||||
// check if an instance is running
|
||||
if self.is_running().await {
|
||||
if !matches!(self.command, CliCommand::Disconnect(_)) && self.is_running().await {
|
||||
bail!("Another instance of the client is already running");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user