network: Check POLLERR and POLLHUP in ff_network_wait_fd