Close database connection

dnsrepo-source
Karel 2021-07-30 11:59:38 +02:00
parent 012a6e6ee9
commit 3b13f7e306
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ func (s *Source) getSubdomainsFromSQL(domain string, results chan subscraping.Re
return 0
}
defer db.Close()
pattern := "%." + domain
query := `SELECT DISTINCT ci.NAME_VALUE as domain FROM certificate_identity ci
WHERE reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower($1))