dns: change non-expired ttl to 50years to avoid int overflow on 32bit os

This commit is contained in:
nadoo committed 2018-08-02 13:28:01 +08:00
1 parent c049b75b64
commit 6cdfbc3552
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -218,7 +218,7 @@ func (c *Client) AddRecord(record string) error {
binary.Write(&buf, binary.BigEndian, uint16(len(b)))
buf.Write(b)
c.cache.Put(getKey(m.Question), buf.Bytes(), HundredYears)
c.cache.Put(getKey(m.Question), buf.Bytes(), LongTTL)
return nil
}