Skip to content

Commit

Permalink
Fix DNS cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed May 12, 2024
1 parent f52ce53 commit b680c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (c *Client) ExchangeWithResponseCheck(ctx context.Context, transport Transp
len(message.Ns) == 0 &&
len(message.Extra) == 0 &&
!clientSubnetLoaded
disableCache := isSimpleRequest || c.disableCache || DisableCacheFromContext(ctx)
disableCache := !isSimpleRequest || c.disableCache || DisableCacheFromContext(ctx)
if !disableCache {
response, ttl := c.loadResponse(question, transport)
if response != nil {
Expand Down

0 comments on commit b680c91

Please sign in to comment.