mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(download-clients): qbit nil logger panic (#344)
The logger wasn't set, so it was always nil. Change to always initialize and override if one is passed.
This commit is contained in:
parent
33e3691737
commit
401c93a657
5 changed files with 72 additions and 39 deletions
|
@ -20,6 +20,14 @@ func (s *service) RunAction(action *domain.Action, release domain.Release) ([]st
|
|||
rejections []string
|
||||
)
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
s.log.Error().Msgf("recovering from panic in run action %v error: %v", action.Name, r)
|
||||
err = errors.New("panic in action: %v", action.Name)
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
switch action.Type {
|
||||
case domain.ActionTypeTest:
|
||||
s.test(action.Name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue