chg: change default connect timeout to 60 seconds
authorJun Wu <quark@fb.com>
Wed, 15 Jun 2016 21:36:31 +0100
changeset 29357 66d41c9e9222
parent 29356 93b83ef78d1e
child 29358 6e83f5bbed8d
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.
contrib/chg/README
contrib/chg/chg.c
--- a/contrib/chg/README	Tue Jun 14 18:14:42 2016 -0700
+++ b/contrib/chg/README	Wed Jun 15 21:36:31 2016 +0100
@@ -29,4 +29,4 @@
  * 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
--- a/contrib/chg/chg.c	Tue Jun 14 18:14:42 2016 -0700
+++ b/contrib/chg/chg.c	Wed Jun 15 21:36:31 2016 +0100
@@ -250,7 +250,7 @@
 
 	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);