chg: change default connect timeout to 60 seconds

As discussed at
https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-June/085290.html

The default 10-second timeout is not enough if the machine is overloaded.
Let's increase it to 60 seconds.
This commit is contained in:
Jun Wu 2016-06-15 21:36:31 +01:00
parent 78417c606d
commit 18674dc0d2
2 changed files with 2 additions and 2 deletions

View File

@ -29,4 +29,4 @@ The following variables are available for testing:
* CHGDEBUG enables debug messages.
* CHGSOCKNAME specifies the socket path of the background cmdserver.
* CHGTIMEOUT specifies how many seconds chg will wait before giving up
connecting to a cmdserver. If it is 0, chg will wait forever. Default: 10
connecting to a cmdserver. If it is 0, chg will wait forever. Default: 60

View File

@ -250,7 +250,7 @@ static hgclient_t *retryconnectcmdserver(struct cmdserveropts *opts, pid_t pid)
debugmsg("try connect to %s repeatedly", opts->sockname);
unsigned int timeoutsec = 10; /* default: 10 seconds */
unsigned int timeoutsec = 60; /* default: 60 seconds */
const char *timeoutenv = getenv("CHGTIMEOUT");
if (timeoutenv)
sscanf(timeoutenv, "%u", &timeoutsec);