From: Anthony Minessale Date: Fri, 27 May 2011 14:51:05 +0000 (-0500) Subject: FS-3313 --resolve Come To ClueCon 2011 http://www.cluecon.com X-Git-Tag: v1.2-rc1~108^2~11^2~40^2~30^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ac088e32c029462e502d625ddc653aa660ff3c2;p=thirdparty%2Ffreeswitch.git FS-3313 --resolve Come To ClueCon 2011 http://www.cluecon.com --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index be24a00d98..329db32582 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1326,6 +1326,10 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread (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; + + if (sleepy_time < 1000 || sleepy_time > 1000000) { + sleepy_time = 1000; + } if (sql || (switch_queue_pop_timeout(profile->sql_queue, &pop, sleepy_time) == SWITCH_STATUS_SUCCESS && pop)) { switch_size_t newlen;