From 70e85c3c58e8720f3a0fdb0240b475338652cdcd Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 20 Jun 2018 20:56:10 +0000 Subject: Increase timeouts to 30s - do not penalize slow clients --- src/utmps/utmps-utmpd.c | 4 ++-- src/utmps/utmps-wtmpd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/utmps/utmps-utmpd.c b/src/utmps/utmps-utmpd.c index b098b79..d8183ae 100644 --- a/src/utmps/utmps-utmpd.c +++ b/src/utmps/utmps-utmpd.c @@ -22,7 +22,7 @@ static int fd = -1 ; static void get0 (char *s, size_t n) { tain_t deadline ; - tain_ulong(&deadline, 2) ; + tain_ulong(&deadline, 30) ; tain_add_g(&deadline, &deadline) ; if (buffer_timed_get_g(buffer_0small, s, n, &deadline) < n) strerr_diefu1sys(111, "read from stdin") ; @@ -31,7 +31,7 @@ static void get0 (char *s, size_t n) static void flush1 (void) { tain_t deadline ; - tain_ulong(&deadline, 2) ; + tain_ulong(&deadline, 30) ; tain_add_g(&deadline, &deadline) ; if (!buffer_timed_flush_g(buffer_1small, &deadline)) strerr_diefu1sys(111, "write to stdout") ; diff --git a/src/utmps/utmps-wtmpd.c b/src/utmps/utmps-wtmpd.c index 3571658..c38168a 100644 --- a/src/utmps/utmps-wtmpd.c +++ b/src/utmps/utmps-wtmpd.c @@ -39,7 +39,7 @@ int main (void) if (!uid0_scan(x, &uid)) strerr_dieinvalid(100, "IPCREMOTEEUID") ; if (ndelay_on(0) < 0) strerr_diefu1sys(111, "set stdin non-blocking") ; tain_now_g() ; - tain_ulong(&deadline, 2) ; + tain_ulong(&deadline, 30) ; tain_add_g(&deadline, &deadline) ; w = buffer_timed_get_g(buffer_0small, buf, 1, &deadline) ; -- cgit 1.4.1