I have some blocking going on in a custom twisted ftp server and I'm
trying to pin point what exactly is doing it.

I think this line in openForReading on my FTPShell object could be the culprit:

_FileReader(urllib2.urlopen(result.link,timeout=settings.GLOBAL_TIMEOUT))

(_FileReader is twisted.protocols.ftp._FileReader and result.link a url string)

I'm guessing urllib2.urlopen blocks resolving the domain and
connecting? What would be the twisted equivalent way of providing a
file like object of the download stream to the FileReader that
wouldn't block?

Regards,

Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to