mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-21 00:04:59 +00:00
fix: security scanner warning noise: error handlers part 2 (#2145)
check off a few more error handlers Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"github.com/go-skynet/LocalAI/core/backend"
|
||||
"github.com/go-skynet/LocalAI/core/config"
|
||||
"github.com/go-skynet/LocalAI/pkg/model"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type TTSCMD struct {
|
||||
@ -40,7 +41,12 @@ func (t *TTSCMD) Run(ctx *Context) error {
|
||||
}
|
||||
ml := model.NewModelLoader(opts.ModelPath)
|
||||
|
||||
defer ml.StopAllGRPC()
|
||||
defer func() {
|
||||
err := ml.StopAllGRPC()
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("unable to stop all grpc processes")
|
||||
}
|
||||
}()
|
||||
|
||||
options := config.BackendConfig{}
|
||||
options.SetDefaults()
|
||||
|
Reference in New Issue
Block a user