Commit 92539674 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Slow down the rate at which capture tries to contact the server on

boss.
parent 37183376
...@@ -213,7 +213,8 @@ main(argc, argv) ...@@ -213,7 +213,8 @@ main(argc, argv)
if (runfile) if (runfile)
signal(SIGUSR1, newrun); signal(SIGUSR1, newrun);
signal(SIGUSR2, terminate); signal(SIGUSR2, terminate);
srandomdev();
/* /*
* Open up run/log file, console tty, and controlling pty. * Open up run/log file, console tty, and controlling pty.
*/ */
...@@ -452,12 +453,12 @@ capture() ...@@ -452,12 +453,12 @@ capture()
#endif #endif
fds = sfds; fds = sfds;
timeout.tv_usec = 0; timeout.tv_usec = 0;
timeout.tv_sec = 30;
#ifdef USESOCKETS #ifdef USESOCKETS
if (needshake) if (needshake) {
timeout.tv_sec = 15; timeout.tv_sec += (random() % 60);
else }
#endif #endif
timeout.tv_sec = 30;
i = select(fdcount, &fds, NULL, NULL, &timeout); i = select(fdcount, &fds, NULL, NULL, &timeout);
if (i < 0) { if (i < 0) {
if (errno == EINTR) { if (errno == EINTR) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment