Ticket #3998: 3998.diff

File 3998.diff, 842 bytes (added by smcq, 6 years ago)

Patch that fixes problem. extractRecord incorrectly attempted to close it's resolver's connection.

  • twisted/names/common.py

     
    201201        if r.type == dns.NS:
    202202            from twisted.names import client
    203203            r = client.Resolver(servers=[(str(r.payload.name), dns.PORT)])
    204             return r.lookupAddress(str(name)
    205                 ).addCallback(lambda (ans, auth, add): extractRecord(r, name, ans + auth + add, level - 1)
    206                 ).addBoth(lambda passthrough: (r.protocol.transport.stopListening(), passthrough)[1])
     204            return r.lookupAddress(str(name)).addCallback(
     205                lambda (ans, auth, add): extractRecord(r, name, ans + auth + add, level - 1)
     206                )
    207207
    208208typeToMethod = {
    209209    dns.A:     'lookupAddress',