diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 71cfd416a9..c1eee58495 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -155,6 +155,7 @@ SWITCH_DECLARE(void) switch_cache_db_flush_handles(void) SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh) { if (dbh && *dbh) { + switch_clear_flag(*dbh, CDF_INUSE); switch_mutex_unlock((*dbh)->mutex); *dbh = NULL; }