Skip to content

Commit

Permalink
Add force conenct to sprofile utils
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Sep 20, 2024
1 parent dbf85c8 commit 6a3c642
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/sprofile/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,13 @@ func SetState(sprflId string, state bool) (err error) {
return
}

if sprfl.ForceConnect && !state {
err = errortypes.ParseError{
errors.New("sprofile: Autostart enforced by server"),
}
return
}

sprfl.Disabled = !state

reqUrl := service.GetAddress() + "/sprofile"
Expand Down

0 comments on commit 6a3c642

Please sign in to comment.