diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-02 17:09:47 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-02 17:09:47 +0000 |
commit | 4015a6816f3f78a0f4ef60529029d4a7dcbb1c9a (patch) | |
tree | b78aa50bef67a5bfb674a689660206e06a0da8e0 /main | |
parent | a39c97dfbeacda618ddaec4261fd5253eefd65c1 (diff) |
Autoservice loop optimization causes a busy loop, when channels are serviced while in hangup.
(closes issue #17564)
Reported by: ramonpeek
Patches:
20100630__issue17564.diff.txt uploaded by tilghman (license 14)
Tested by: ramonpeek
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273717 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/autoservice.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/autoservice.c b/main/autoservice.c index e82998a44..e5f183735 100644 --- a/main/autoservice.c +++ b/main/autoservice.c @@ -115,6 +115,11 @@ static void *autoservice_run(void *ign) AST_LIST_UNLOCK(&aslist); if (!x) { + /* If we don't sleep, this becomes a busy loop, which causes + * problems when Asterisk runs at a different priority than other + * user processes. As long as we check for new channels at least + * once every 10ms, we should be fine. */ + usleep(10000); continue; } |