Skip to content

Commit

Permalink
fix: add extra check to make sure tshark config is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk committed Jun 10, 2024
1 parent 155b50b commit 05d4691
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/instance/tshark.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func (i *Instance) createTsharkCollectorInstance(ctx context.Context) (*Instance
return nil, err
}

if i.tsharkCollectorConfig == nil {
return nil, ErrTsharkCollectorConfigNotSet
}

envVars := map[string]string{
envStorageAccessKeyID: i.tsharkCollectorConfig.S3AccessKey,
envStorageSecretAccessKey: i.tsharkCollectorConfig.S3SecretKey,
Expand Down

0 comments on commit 05d4691

Please sign in to comment.