• Jeremy Hylton's avatar
    Add timeout to try_connecting() method. · 353aeeac
    Jeremy Hylton authored
    The timeout is necessary because in some cases a non-blocking connect
    while neither succeed nor fail.  It is unacceptable to simply get
    stuck forever in this code, because it is run at least once inside the
    ClientStorage constructor.
    
    Set the first timeout to a fairly low number -- 5 seconds -- so that a
    ClientStorage(wait=0) call does not take a inordinate length of time.
    Then set the default to a longer number -- 75 seconds, which is
    typical timeout for a blocking connect() call.
    
    This change fixes the hang in testZEOStorage from testStorageConfig.
    
    XXX Need to get Guido to review the changes.
    353aeeac
client.py 19.1 KB