[Twisted-Python] XMPP server connection question

Gabriel Rossetti gabriel.rossetti at arimaz.com
Fri Dec 5 06:23:08 EST 2008


Phil Mayers wrote:
> Christopher Zorn wrote:
>>
>>
>> On Tue, Dec 2, 2008 at 8:21 AM, Gabriel Rossetti 
>> <gabriel.rossetti at arimaz.com <mailto:gabriel.rossetti at arimaz.com>> 
>> wrote:
>>
>>     Gabriel Rossetti wrote:
>>
>>         Hello everyone,
>>
>>         I wrote an XMPP client and I have a question, when it tries to
>>         connect and the server is not listening, it doesn't send back an
>>         error and tries forever. I see that this function
>>         (twisted/names/srvconnect.py):
>>
>>         def _ebGotServers(self, failure):
>>               failure.trap(DNSNameError)
>>
>>               # Some DNS servers reply with NXDOMAIN when in fact 
>> there are
>>               # just no SRV records for that domain. Act as if we just
>>         got an
>>               # empty response and use fallback.
>>
>>               self.servers = []
>>               self.orderedServers = []
>>
>>         traps the exception so it never propagates to me, so I can't
>>         handle it. Any ideas? I using the XMPP client example as a base
>>         for my code.
>>
>>         Thank you,
>>         Gabriel
>>
>>     Ok, the code I showed has nothing to do with the problem I think,
>>     what I don't get is the client never returns an error if nobody's
>>     listening...
>>
>>
>> It may be better to show a log of what is happening.
>>
>
> Yeah, the t.w.p.j.xmlstream.XmlStreamFactory inherits from 
> ReconnectingClientFactory, which is IMHO wrong.
>
> See also:
>
> http://twistedmatrix.com/trac/ticket/3492
>
Yes, so do I.




More information about the Twisted-Python mailing list