From 3997241db3f32668b7ec4d29a597027d2c036617 Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 1 Jun 2020 13:25:56 +1000 Subject: Still failing to reconnect for dbCount(), just set the fucking timeout to a year. --- src/sledjchisl/sledjchisl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index a8d8b3f..51f14eb 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1095,15 +1095,14 @@ static boolean dbConnect() return FALSE; } - // Just set the fucking thing. Pffft. + // Just set the fucking thing to a year. Pffft. dbTimeout = 60 * 60 * 24 * 7 * 52; -dbTimeout = 100; char *sql = xmprintf("SET SESSION wait_timeout=%d", (int) dbTimeout); if (mysql_query(database, sql)) E("SET SESSION wait_timeout=%d failed - %s", (int) dbTimeout, mysql_error(database)); else - D("Database wait_timeout = %d", (int) dbReconnect); + D("Database wait_timeout = %d", (int) dbTimeout); free(sql); if (-1 == clock_gettime(CLOCK_REALTIME, &dbLast)) @@ -1129,6 +1128,7 @@ static boolean dbCheckError(char *error, char *sql) if (2006 == e) { W("Reconnecting to database."); +// TODO - still failing to reconnect for dbCount() on coffeegrid. freeDb(false); return dbConnect(); } -- cgit v1.1