summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulian Bouzas <julian.bouzas@collabora.com>2021-06-28 11:21:51 -0400
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-28 13:19:02 +0300
commit03fc350641c4a508dadf1a3d7477a48c5f4cda42 (patch)
treec4ec031c744cbff9aef10d03f1625865b0774257 /tests
parent8745cd5d0cba0da5729bb75187aefb01c6b5dc83 (diff)
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. Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions