varlink: disconnect varlink link in one more case
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Oct 2021 15:29:48 +0000 (17:29 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:47:09 +0000 (10:47 +0100)
commitb2fb06ef7c338b81940a7bdeec2d4af352690ec7
treef72a3e61e8d68ae9cd4248aed838fe6e4023605d
parente4a9f499868eafc2e5dde17d6e5fafd509b4ae7c
varlink: disconnect varlink link in one more case

Previously we'd possibly see POLLHUP on a varlink link, and continue to
run epoll on it even though we have nothing to read nor write anymore.

Let's fix that, and once we know that there's nothing to write anymore
(or we saw a write error already) we'll disconnect after POLLHUP.

Fixes: #20062
(cherry picked from commit 7c26a631ad8bf91016db156b7d299ca68fd7866e)
(cherry picked from commit 968f2f3f5a76b05142e1de447bb79f4f97868721)
src/shared/varlink.c