mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-12 07:43:32 -07:00
add error checking to loading whitelist
This commit is contained in:
+4
-1
@@ -51,7 +51,10 @@ func New(cfg *config.Config) (*Tracker, error) {
|
||||
}
|
||||
|
||||
if cfg.ClientWhitelistEnabled {
|
||||
tkr.LoadApprovedClients(cfg.ClientWhitelist)
|
||||
err = tkr.LoadApprovedClients(cfg.ClientWhitelist)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return tkr, nil
|
||||
|
||||
Reference in New Issue
Block a user