On Thu, Jan 19, 2012 at 8:19 AM, Facundo Batista <facundobati...@gmail.com>wrote:
> I have some code that uses a twisted.web.client.HTTPClientFactory. > > I've found that because some issues (firewall rules, not relevant to > the problem), I experienced failures to connect. > > More specifically, I told it to connect to one particular address, and > because of DNS load distribution, that address converted to several > different IPs, and one of that IPs was not open, so it failed to > connect with a TCPTimedOutError (code 110). > > When it failed to connect, it executed the "clientConnectionFailed" > method of HTTPClientFactory, which receives a > twisted.internet.tcp.Connector instance, and the reason of the > failure. > > The question is: Is there a way, at that point (when > clientConnectionFailed is called), to find out *to which IP* it failed > to connect? > > Thank you very much! > > -- > . Facundo > > Blog: http://www.taniquetil.com.ar/plog/ > PyAr: http://www.python.org/ar/ > twisted.internet.tcp.Connector has a getDestination() method, which should return an address object. Have you tried that? (I haven't, but it looks like the right thing) Kevin Horn
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python