Compare commits

...

2 Commits

Author SHA1 Message Date
Lennart Poettering 8b6ce6d9c5
Merge 2af2e3e799 into 6fd3496cfd 2024-11-24 22:57:43 -08:00
Lennart Poettering 2af2e3e799 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).
2024-11-20 15:09:18 +01:00
1 changed files with 2 additions and 1 deletions

View File

@ -1698,7 +1698,8 @@ _public_ int sd_varlink_get_events(sd_varlink *v) {
ret |= EPOLLIN; ret |= EPOLLIN;
if (!v->write_disconnected && if (!v->write_disconnected &&
v->output_buffer_size > 0) (v->output_queue ||
v->output_buffer_size > 0))
ret |= EPOLLOUT; ret |= EPOLLOUT;
return ret; return ret;