iface proper destructor
Inside iface::~iface(), make sure to close any open sockets and restore ALLMULTI to it's original value.
This commit is contained in:
parent
62edaf3c6b
commit
70933e0830
@ -53,6 +53,15 @@ iface::iface() :
|
|||||||
iface::~iface()
|
iface::~iface()
|
||||||
{
|
{
|
||||||
DBG("iface::~iface()");
|
DBG("iface::~iface()");
|
||||||
|
|
||||||
|
if(_ifd >= 0)
|
||||||
|
close(_ifd);
|
||||||
|
|
||||||
|
if(_pfd >= 0)
|
||||||
|
{
|
||||||
|
allmulti(_prev_allmulti);
|
||||||
|
close(_pfd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strong_ptr<iface> iface::open_pfd(const std::string& name)
|
strong_ptr<iface> iface::open_pfd(const std::string& name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user