mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 00:21:30 +00:00
Fix check config
This commit is contained in:
parent
03ce555104
commit
45852ca3e7
|
@ -31,7 +31,10 @@ func check() error {
|
|||
return err
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
_, err = box.New(ctx, options, nil)
|
||||
instance, err := box.New(ctx, options, nil)
|
||||
if err == nil {
|
||||
instance.Close()
|
||||
}
|
||||
cancel()
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue