mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-23 02:25:39 +02:00
module/battery: poll-interval = 0 now disables polling
This commit is contained in:
parent
bdc5dea428
commit
86e6aea152
2 changed files with 2 additions and 2 deletions
|
@ -337,7 +337,7 @@ run(struct module *mod)
|
|||
{.fd = mod->abort_fd, .events = POLLIN},
|
||||
{.fd = udev_monitor_get_fd(mon), .events = POLLIN},
|
||||
};
|
||||
poll(fds, 2, m->poll_interval * 1000);
|
||||
poll(fds, 2, m->poll_interval > 0 ? m->poll_interval * 1000 : -1);
|
||||
|
||||
if (fds[0].revents & POLLIN) {
|
||||
ret = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue