aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/res_odbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index f97a19863..201cf77b9 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -516,7 +516,7 @@ struct odbc_obj *ast_odbc_request_obj(const char *name, int check)
if (obj && check) {
ast_odbc_sanity_check(obj);
- } else if (obj->parent->idlecheck > 0 && ast_tvdiff_ms(ast_tvnow(), obj->last_used) / 1000 > obj->parent->idlecheck)
+ } else if (obj && obj->parent->idlecheck > 0 && ast_tvdiff_sec(ast_tvnow(), obj->last_used) > obj->parent->idlecheck)
odbc_obj_connect(obj);
return obj;