Add timeout to try_connecting() method.
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.
Showing
Please register or sign in to comment