]> git.ipfire.org Git - thirdparty/asterisk.git/commit
websocket / aeap: Handle poll() interruptions better.
authorJoshua C. Colp <jcolp@sangoma.com>
Tue, 28 Jun 2022 11:59:40 +0000 (08:59 -0300)
committerJoshua Colp <jcolp@sangoma.com>
Mon, 11 Jul 2022 09:10:53 +0000 (04:10 -0500)
commit311e3e11e21283598a90252df8244f8e1d885fac
tree508159d13ce6016e081df561c3618e7e01810eea
parentdaa81f6359cabdf4e44353da9deae2ac7f82e639
websocket / aeap: Handle poll() interruptions better.

A sporadic test failure was happening when executing the AEAP
Websocket transport tests. It was originally thought this was
due to things not getting cleaned up fast enough, but upon further
investigation I determined the underlying cause was poll()
getting interrupted and this not being handled in all places.

This change adds EINTR and EAGAIN handling to the Websocket
client connect code as well as the AEAP Websocket transport code.
If either occur then the code will just go back to waiting
for data.

The originally disabled failure test case has also been
re-enabled.

ASTERISK-30099

Change-Id: I1711a331ecf5d35cd542911dc6aaa9acf1e172ad
res/res_aeap/transport_websocket.c
res/res_http_websocket.c
tests/test_aeap_transport.c