]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_audiosocket: Fixed timeout with -1 to avoid busy loop.
authorzhengsh <zhengsh@ti-net.com.cn>
Thu, 24 Aug 2023 09:27:14 +0000 (17:27 +0800)
committerzhengsh <zhengsh@ti-net.com.cn>
Mon, 28 Aug 2023 13:36:49 +0000 (13:36 +0000)
Resolves: asterisk#234

apps/app_audiosocket.c

index 45d33964b0b06e83b0bc8d0457ef73d263dcd4c4..ded88ccf7f001f2667ce3daa47af0ff5f2aede98 100644 (file)
@@ -180,7 +180,7 @@ static int audiosocket_run(struct ast_channel *chan, const char *id, int svc)
        chanName = ast_channel_name(chan);
 
        while (1) {
-
+               ms = -1;
                targetChan = ast_waitfor_nandfds(&chan, 1, &svc, 1, NULL, &outfd, &ms);
                if (targetChan) {
                        f = ast_read(chan);