summaryrefslogtreecommitdiff
path: root/package/hotplug2/patches/100-recv_check.patch
blob: 168df47bb0ec78d14d10adfd1159aa57242d2ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/hotplug2.c
+++ b/hotplug2.c
@@ -300,6 +300,9 @@ int main(int argc, char *argv[]) {
 	worker_ctx = settings->worker->module->init(settings);
 	while (process) {
 		size = recv(settings->netlink_socket, &buffer, sizeof(buffer), 0);
+		if (size < 0)
+			continue;
+
 		uevent = uevent_deserialize(buffer, size);
 		
 		if (uevent == NULL)