Fix DNS transports

This commit is contained in:
世界
2025-12-29 20:44:30 +08:00
parent 4e94a64dcc
commit aa8dd6e44f
18 changed files with 754 additions and 220 deletions

View File

@@ -108,6 +108,13 @@ func (t *Transport) Close() error {
return nil
}
func (t *Transport) Reset() {
t.transportLock.Lock()
t.updatedAt = time.Time{}
t.servers = nil
t.transportLock.Unlock()
}
func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error) {
servers, err := t.fetch()
if err != nil {