diff --git a/fipvlan.c b/fipvlan.c
index 6f8cf39..64702a7 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -749,9 +749,15 @@ static void recv_loop(int timeout)
rtnl_recv(pfd[0].fd, rtnl_listener_handler, NULL);
/* everything else should be FIP packet sockets */
for (i = 1; i < pfd_len; i++) {
- if (pfd[i].revents & POLLIN)
- fip_recv(pfd[i].fd, fip_vlan_handler, NULL);
+ if (pfd[i].revents & POLLIN) {
+ rc = fip_recv(pfd[i].fd, fip_vlan_handler,
+ NULL);
+ if (rc < 0)
+ break;
+ }
}
+ if (i < pfd_len)
+ break;
}
}