mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-08-03 22:24:44 +00:00
platform: Fix missing api version check for usb/ip
This commit is contained in:
parent
64a0e0ce6b
commit
8e9c61afa3
1 changed files with 10 additions and 0 deletions
|
|
@ -711,6 +711,16 @@ func (c *CommandClient) GetStartedAt() (int64, error) {
|
|||
})
|
||||
}
|
||||
|
||||
func (c *CommandClient) GetAPIVersion() (int32, error) {
|
||||
return callWithResult(c, func(ctx context.Context, client daemon.StartedServiceClient) (int32, error) {
|
||||
version, err := client.GetVersion(ctx, &emptypb.Empty{})
|
||||
if err != nil {
|
||||
return 0, E.Cause(err, "get version")
|
||||
}
|
||||
return version.ApiVersion, nil
|
||||
})
|
||||
}
|
||||
|
||||
func (c *CommandClient) SetGroupExpand(groupTag string, isExpand bool) error {
|
||||
_, err := callWithResult(c, func(ctx context.Context, client daemon.StartedServiceClient) (*emptypb.Empty, error) {
|
||||
return client.SetGroupExpand(ctx, &daemon.SetGroupExpandRequest{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue