Skip to content

Commit

Permalink
fix dynamic server idle timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed Apr 22, 2018
1 parent dc715dc commit 9fe5485
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,18 +354,18 @@ void *tlsclientrd(void *arg) {
break;
tlsconnect(server, &lastconnecttry, 0, "tlsclientrd");
}
if (server->dynamiclookuparg) {
gettimeofday(&now, NULL);
if (now.tv_sec - server->lastreply.tv_sec > IDLE_TIMEOUT) {
debug(DBG_INFO, "tlsclientrd: idle timeout for %s", server->conf->name);
break;
}
}
continue;
}

replyh(server, buf);

if (server->dynamiclookuparg) {
gettimeofday(&now, NULL);
if (now.tv_sec - server->lastreply.tv_sec > IDLE_TIMEOUT) {
debug(DBG_INFO, "tlsclientrd: idle timeout for %s", server->conf->name);
break;
}
}
}
debug(DBG_INFO, "tlsclientrd: exiting for %s", server->conf->name);
pthread_mutex_lock(&server->lock);
Expand Down

0 comments on commit 9fe5485

Please sign in to comment.