mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-01 22:35:49 +02:00
more clean up
This commit is contained in:
parent
21bb2a824d
commit
0504883378
1 changed files with 1 additions and 2 deletions
|
@ -47,13 +47,12 @@ func (b *DNSHandler) ServeDNS(w dns.ResponseWriter, req *dns.Msg) {
|
|||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
log := b.Log.WithName("serveDNS")
|
||||
//fmt.Printf("req: %v\n", req)
|
||||
m := new(dns.Msg)
|
||||
m.SetReply(req)
|
||||
defer w.WriteMsg(m)
|
||||
|
||||
log.Info(m.String())
|
||||
log.Info("\n\nreq count: %v\nlen: %v\n\n", requestCount[req.Question[0].Name], len(b.TxtRecords[req.Question[0].Name]))
|
||||
|
||||
if requestCount[req.Question[0].Name] < len(b.TxtRecords[req.Question[0].Name]) {
|
||||
// TODO: investigate why this is needed. It seems that the object isn't being released between tests
|
||||
if requestCount[req.Question[0].Name] == 3 {
|
||||
|
|
Loading…
Reference in a new issue