wireplumber/lib/wpipc
Julian Bouzas 6b8ea83404 wpipc: sender: disconnect and clear all pending tasks if connection was lost
If we don't remove the socket from epoll when the connection is lost, we risk
having the lost callback triggered more than once by epoll, creating race
condition in the unit test because more than 1 event happened. The epoll thread
and socket will be re-created again when re-connecting.

Note that we cannot destroy the epoll thread before triggering the lost
connection callback because we are running the callback in the epoll thread,
which is why removing the socket from epoll is the only way to make sure the
lost connection callback is only triggered once.
2021-06-28 11:38:37 -04:00
..
client.c lib: add wpipc library 2021-05-04 18:55:10 -04:00
client.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
defs.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
meson.build meson: generate and install pkg-config file for wpipc 2021-05-06 13:06:49 +03:00
private.h wpipc: change epoll thread func type name to be more consistent 2021-06-28 11:38:37 -04:00
protocol.c wpipc: protocol: make sure buffer is initialized to 0 before building reply/request 2021-06-28 11:38:37 -04:00
protocol.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
receiver.c wpipc: receiver: also emit sender disconnected when failed to read 2021-06-28 11:38:37 -04:00
receiver.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
sender.c wpipc: sender: disconnect and clear all pending tasks if connection was lost 2021-06-28 11:38:37 -04:00
sender.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
server.c lib: fix some issues found by coverity 2021-06-15 17:43:22 +03:00
server.h lib: add wpipc library 2021-05-04 18:55:10 -04:00
utils.c wpipc: change epoll thread func type name to be more consistent 2021-06-28 11:38:37 -04:00
wpipc.h lib: add wpipc library 2021-05-04 18:55:10 -04:00