Skip to content

Commit

Permalink
fix: close file in the PopulateConfig func
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Apr 12, 2024
1 parent d80b603 commit 7f7ea6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ func (server *ApiServer) PopulateConfig(filename string) {
logger.Err(err).Str("config", filename).Msg("Error reading config file")
return
}

defer file.Close()

proxies, err := server.Collection.PopulateJson(server, file)
if err != nil {
logger.Err(err).Msg("Failed to populate proxies from file")
Expand Down

0 comments on commit 7f7ea6b

Please sign in to comment.