[Twisted-Python] tcp error

Thomas Jacob jacob at internet24.de
Tue Jul 11 09:02:08 EDT 2006

> Can be, I think, the connection closed by my code: into it, I close
> connection ( self._myClient.quit() ) when I receive an error
> (addErrback), but I have a "callLater" that are always running, so when
> called, it run the code that can generate that error.
> I think that I have to control the "internal connection state" before
> make a call to the ftp client. I'm right? Or is there a method for say
> to twisted to don't make calls (with the ftp protocol) when it aren't
> connected?

Don't know, I am an (enthusiastic) twisted newbie as well, but
probably you should do the first thing. You could for instance
test whether or not <some tcp port>.connected is set, before
you call ftp client functions functions.... that
is check <ftpclient>.transport.connected...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20060711/a03fd327/attachment.pgp 

More information about the Twisted-Python mailing list