diff options
Diffstat (limited to 'src/sql.c')
-rw-r--r-- | src/sql.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,3 @@ /* This file is part of vmod-dbrw - Copyright (C) 2013-2014 Sergey Poznyakoff + Copyright (C) 2013-2018 Sergey Poznyakoff @@ -145,2 +145,3 @@ sql_query(struct dbrw_connection *conn, const char *input) } while (conn->state != state_connected); + conn->timestamp = time(NULL); if (conn->conf->backend->sql_query(conn, input) == 0) @@ -187 +188,9 @@ sql_get_column(struct dbrw_connection *conn, unsigned row, unsigned col) +int +sql_idle_timeout(struct dbrw_connection *conn) +{ + CONN_ASSERT_VAL(conn, -1); + if (!conn->conf->backend->sql_idle_timeout) + return -1; + return conn->conf->backend->sql_idle_timeout(conn); +} |