[Python-Dev] Adding socket timeout to urllib2

skip at pobox.com skip at pobox.com
Wed Mar 7 03:05:59 CET 2007


    >> Think of it this way. "Timeout" doesn't mean the whole thing needs to
    >> be completed in 10 secs. It means that over 10 secs of no activity
    >> causes it to be aborted.

    Adam> IOW, It's an idle timeout.

Not quite.  It's a timeout when you are waiting for some sort of response.
If you make a connection to an ftp server to send files the connection
shouldn't be aborted if you take more than 10 seconds to prepare the file
you want to upload.  OTOH, if you send the file and don't get an
acknowledgement back for 10 seconds, then you get a TimeoutError.

Skip


More information about the Python-Dev mailing list