diff options
Diffstat (limited to 'src/sledjchisl')
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 6 |
1 files 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() | |||
1095 | return FALSE; | 1095 | return FALSE; |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | // Just set the fucking thing. Pffft. | 1098 | // Just set the fucking thing to a year. Pffft. |
1099 | dbTimeout = 60 * 60 * 24 * 7 * 52; | 1099 | dbTimeout = 60 * 60 * 24 * 7 * 52; |
1100 | dbTimeout = 100; | ||
1101 | char *sql = xmprintf("SET SESSION wait_timeout=%d", (int) dbTimeout); | 1100 | char *sql = xmprintf("SET SESSION wait_timeout=%d", (int) dbTimeout); |
1102 | 1101 | ||
1103 | if (mysql_query(database, sql)) | 1102 | if (mysql_query(database, sql)) |
1104 | E("SET SESSION wait_timeout=%d failed - %s", (int) dbTimeout, mysql_error(database)); | 1103 | E("SET SESSION wait_timeout=%d failed - %s", (int) dbTimeout, mysql_error(database)); |
1105 | else | 1104 | else |
1106 | D("Database wait_timeout = %d", (int) dbReconnect); | 1105 | D("Database wait_timeout = %d", (int) dbTimeout); |
1107 | free(sql); | 1106 | free(sql); |
1108 | 1107 | ||
1109 | if (-1 == clock_gettime(CLOCK_REALTIME, &dbLast)) | 1108 | if (-1 == clock_gettime(CLOCK_REALTIME, &dbLast)) |
@@ -1129,6 +1128,7 @@ static boolean dbCheckError(char *error, char *sql) | |||
1129 | if (2006 == e) | 1128 | if (2006 == e) |
1130 | { | 1129 | { |
1131 | W("Reconnecting to database."); | 1130 | W("Reconnecting to database."); |
1131 | // TODO - still failing to reconnect for dbCount() on coffeegrid. | ||
1132 | freeDb(false); | 1132 | freeDb(false); |
1133 | return dbConnect(); | 1133 | return dbConnect(); |
1134 | } | 1134 | } |