mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
sd-varlink: fix bug when enqueuing messages with fds asynchronously
When determining the poll events to wait for we need to take the queue of pending messages that carry fds into account. Otherwise we might end up not waking up if such an fd-carrying message is enqueued asynchronously (i.e. not from a dispatch callback). (cherry picked from commit 7b4b3a8f7b76f266438fafb225b7980db68a276e)
This commit is contained in:
parent
09accdb68c
commit
b2751b9ae9
@ -1708,7 +1708,8 @@ int varlink_get_events(Varlink *v) {
|
||||
ret |= EPOLLIN;
|
||||
|
||||
if (!v->write_disconnected &&
|
||||
v->output_buffer_size > 0)
|
||||
(v->output_queue ||
|
||||
v->output_buffer_size > 0))
|
||||
ret |= EPOLLOUT;
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user