[Twisted-Python] resolution failure after upgrade to twisted 2.0
exarkun at divmod.com
Tue Jul 5 21:52:29 EDT 2005
On Tue, 5 Jul 2005 21:27:57 -0400, Paul Pelzl <pelzlpj at eecs.umich.edu> wrote:
>I maintain a wxPython application that uses Twisted for the networking
>back-end. After upgrading from Twisted 1.3 to 2.0, the application
>fails to connect to a given hostname (e.g. "localhost"), although
>everything works fine if an explicit IP address is provided. My
>application runs the Twisted loop by polling with a timer, like so:
Your app doesn't seem to be starting the reactor via the public API. This is probably causing the threadpool to never be started up.
Twisted 2.0 switched to doing name resolution using the threadpool, since it can block for significant amounts of time. If the threadpool never starts up, no names will ever be resolvable.
Explicitly installing BlockingResolver or starting up the reactor in a way which starts the threadpool should fix the problem.
More information about the Twisted-Python