forked from Mirrors/freeswitch
[Core] Fix database handles infinitely locked in switch_cache_db_database_interface_flush_handles()
This commit is contained in:
parent
58f7c2d64e
commit
94337b33fb
|
@ -156,10 +156,12 @@ top:
|
||||||
for (dbh_ptr = sql_manager.handle_pool; dbh_ptr; dbh_ptr = dbh_ptr->next) {
|
for (dbh_ptr = sql_manager.handle_pool; dbh_ptr; dbh_ptr = dbh_ptr->next) {
|
||||||
if (switch_mutex_trylock(dbh_ptr->mutex) == SWITCH_STATUS_SUCCESS) {
|
if (switch_mutex_trylock(dbh_ptr->mutex) == SWITCH_STATUS_SUCCESS) {
|
||||||
if (dbh_ptr->type != SCDB_TYPE_DATABASE_INTERFACE) {
|
if (dbh_ptr->type != SCDB_TYPE_DATABASE_INTERFACE) {
|
||||||
|
switch_mutex_unlock(dbh_ptr->mutex);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbh_ptr->native_handle.database_interface_dbh->connection_options.database_interface != database_interface) {
|
if (dbh_ptr->native_handle.database_interface_dbh->connection_options.database_interface != database_interface) {
|
||||||
|
switch_mutex_unlock(dbh_ptr->mutex);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue