Skip to content

Commit

Permalink
fix: AWS status check within KES
Browse files Browse the repository at this point in the history
the returned response body is not closed casued the file descriptor exceed the system limit
  • Loading branch information
Einsteinder authored and aead committed Mar 1, 2024
1 parent a960e3c commit e41af9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/keystore/aws/secrets-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ func (s *Store) Status(ctx context.Context) (kes.KeyStoreState, error) {
}

start := time.Now()
if _, err = http.DefaultClient.Do(req); err != nil {
res, err := http.DefaultClient.Do(req)
if err != nil {
return kes.KeyStoreState{}, &keystore.ErrUnreachable{Err: err}
}
defer res.Body.Close()

Check failure on line 120 in internal/keystore/aws/secrets-manager.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `gofumpt`-ed (gofumpt)
return kes.KeyStoreState{
Latency: time.Since(start),
}, nil
Expand Down

0 comments on commit e41af9f

Please sign in to comment.