[Twisted-Python] custom FTP server is blocking
Paul Wiseman
poalman at gmail.com
Thu Mar 19 12:18:27 MDT 2015
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
More information about the Twisted-Python
mailing list