equal
deleted
inserted
replaced
248 static const struct timespec sleepreq = {0, 10 * 1000000}; |
248 static const struct timespec sleepreq = {0, 10 * 1000000}; |
249 int pst = 0; |
249 int pst = 0; |
250 |
250 |
251 debugmsg("try connect to %s repeatedly", opts->sockname); |
251 debugmsg("try connect to %s repeatedly", opts->sockname); |
252 |
252 |
253 unsigned int timeoutsec = 10; /* default: 10 seconds */ |
253 unsigned int timeoutsec = 60; /* default: 60 seconds */ |
254 const char *timeoutenv = getenv("CHGTIMEOUT"); |
254 const char *timeoutenv = getenv("CHGTIMEOUT"); |
255 if (timeoutenv) |
255 if (timeoutenv) |
256 sscanf(timeoutenv, "%u", &timeoutsec); |
256 sscanf(timeoutenv, "%u", &timeoutsec); |
257 |
257 |
258 for (unsigned int i = 0; !timeoutsec || i < timeoutsec * 100; i++) { |
258 for (unsigned int i = 0; !timeoutsec || i < timeoutsec * 100; i++) { |