chiark / gitweb /
udev: make sure we aleways read from netlink, if there is data
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 26 Nov 2010 15:06:30 +0000 (16:06 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 26 Nov 2010 15:06:30 +0000 (16:06 +0100)
src/device.c

index b576364..957bc2d 100644 (file)
@@ -533,7 +533,8 @@ void device_fd_event(Manager *m, int events) {
 
                 if (!ratelimit_test(&limit))
                         log_error("Failed to get udev event: %m");
 
                 if (!ratelimit_test(&limit))
                         log_error("Failed to get udev event: %m");
-                return;
+                if (!(events & EPOLLIN))
+                        return;
         }
 
         if (!(dev = udev_monitor_receive_device(m->udev_monitor))) {
         }
 
         if (!(dev = udev_monitor_receive_device(m->udev_monitor))) {