Listen for context end better in resolver

This commit is contained in:
Daniel
2021-09-17 22:04:41 +02:00
parent 8b489f4c26
commit a6ce021dbd
3 changed files with 27 additions and 4 deletions

View File

@@ -418,6 +418,8 @@ func queryMulticastDNS(ctx context.Context, q *Query) (*RRCache, error) {
if err != nil {
return rrCache, nil
}
case <-ctx.Done():
return nil, ErrCancelled
}
// Respond with NXDomain.