Commit 18369354 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[2765] Close fallback sockets together with primary sockets.

parent e4d1f908
......@@ -88,6 +88,10 @@ Iface::closeSockets(const uint16_t family) {
// Close and delete the socket and move to the
// next one.
close(sock->sockfd_);
// Close fallback socket if open.
if (sock->fallbackfd_) {
close(sock->fallbackfd_);
}
sockets_.erase(sock++);
} else {
......@@ -148,6 +152,10 @@ bool Iface::delSocket(uint16_t sockfd) {
while (sock!=sockets_.end()) {
if (sock->sockfd_ == sockfd) {
close(sockfd);
// Close fallback socket if open.
if (sock->fallbackfd_) {
close(sock->fallbackfd_);
}
sockets_.erase(sock);
return (true); //socket found
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment