Fix segfault on shut down of SQL queue manager in rare case where registration cleanup is firing at the same time the queue manager is shutting down.

This commit is contained in:
Eliot Gable 2013-01-03 23:07:54 +00:00
parent b2714cbc30
commit 68626bbbbd
1 changed files with 2 additions and 3 deletions

View File

@ -3251,14 +3251,13 @@ void switch_core_sqldb_stop(void)
switch_event_unbind_callback(core_event_handler);
switch_core_sqldb_stop_thread();
if (sql_manager.db_thread && sql_manager.db_thread_running) {
sql_manager.db_thread_running = -1;
switch_thread_join(&st, sql_manager.db_thread);
}
switch_core_sqldb_stop_thread();
switch_cache_db_flush_handles();
sql_close(0);
}