
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...