]> 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:19 +0000 (04:10 -0500)
commit68bcf4c4c517897b698450e4d8a17259a7fb57f8
tree88b95a947813f6cc8e32a0498de3871dde8c764f
parentf5680a75687431f24dbc88ca0bd8e35d0a52878a
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