Do you set a socket timeout value via socket.setdefaulttimeout? see: http://www.python.org/doc/2.6/library/socket.html#socket.setdefaulttimeout
~Gerdus On Thu, Aug 13, 2009 at 7:17 PM, Marte Soliza<myrtac...@gmail.com> wrote: > I'm using httplib as an HTTP client for a custom HTTP server. One thing I > need is to be able to immediately force disconnect a request that takes too > long on the server side (and hasn't returned any data) or if the connection > becomes problematic to the point that no data returns for a long period of > time. The blocking part happens when getresponse is being called on the > HTTPConnection object. In Linux, on a separate thread, I can call shutdown > on the socket of the connection object and the getresponse call immediately > raises an error. However, in Windows (XP SP3 in particular), this seems to > be not the case. It still waits for the server to communicate something > back. Do I need to call a Windows-specific function to achieve the same as > in Linux? > > Thanks. > > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > > _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32