]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression
authorMathieu Rene <mrene@avgs.ca>
Fri, 19 Nov 2010 17:07:07 +0000 (12:07 -0500)
committerMathieu Rene <mrene@avgs.ca>
Fri, 19 Nov 2010 17:07:19 +0000 (12:07 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 9fadced17f9b228d753f94af217838b1abacdad5..9cc515ed9cfd010e4743a5ba1b0e66cf1c2d71ea 100644 (file)
@@ -1256,6 +1256,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
                if (sofia_test_pflag(profile, PFLAG_SQL_IN_TRANS)) {
                        /* Do we have enough statements or is the timeout expired */
                        while (sql || (sofia_test_pflag(profile, PFLAG_RUNNING) && mod_sofia_globals.running == 1 &&
+                                               switch_micro_time_now() - last_check < 1000000 &&
                                        (statements == 0 || (statements <= 1024 && (switch_micro_time_now() - last_commit)/1000 < profile->trans_timeout)))) {
                                
                                switch_interval_time_t sleepy_time = !statements ? 1000000 : switch_micro_time_now() - last_commit - profile->trans_timeout*1000;