id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	branch	branch_author	launchpad_bug
3217	twisted.names.dns: DNSDatagramProtocol doesn't release unused UDP-ports	pittipatti		"In class ""DNSDatagramProtocol"" the function ""startListening"" attaches a UDP-port to the reactor, but leaves it attached even when the protocol is closed.

In my application I have to create new resolvers for querying many different nameservers.

Please have a look at the attachments with sample code which results
  1. in many listening UDP-ports ( please see in another console: netstat -anpu | grep python )
  2. in a (rather strange) exception (ImportError: cannot import name SHA)

As mentioned above, DNSDatagramProtocol.startListening() executes reactor.listenUDP, but the returned port isn't saved anywere, so it can't be closed.
I saved it as a instance-variable but have no clue where to call the stopListening()-function, since DNSDatagramProtocol.stopProtocol() or DNSDatagramProtocol.doStop() don't seem to be called at all."	defect	closed	normal		names	fixed	names				
