Merge pull request #47 from Lalufu/bugfix/disappearing-if

Handle disappearing interfaces
This commit is contained in:
Daniel Adolfsson 2019-05-06 21:12:08 +02:00 committed by GitHub
commit 97754c0a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -647,12 +647,17 @@ int iface::poll_all()
bool is_pfd = i++ % 2;
ptr<iface> ifa = i_it->second;
if (f_it->revents & POLLERR) {
logger::error() << "Error polling interface " << ifa->_name.c_str();
return -1;
}
if (!(f_it->revents & POLLIN)) {
continue;
}
ptr<iface> ifa = i_it->second;
address saddr, daddr, taddr;
ssize_t size;