0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

When exceptions occur in TUN interface setup, make sure to

call close method on tun_persist object rather than merely
deleting the smart pointer (because other references could
still exist, preventing immediate close).
This commit is contained in:
James Yonan 2014-02-21 12:28:18 -07:00
parent aa26213b3e
commit aa92a7a522
2 changed files with 2 additions and 2 deletions

View File

@ -170,9 +170,9 @@ namespace openvpn {
}
catch (const std::exception& e)
{
stop();
if (tun_persist)
tun_persist->close();
stop();
parent.tun_error(Error::TUN_SETUP_FAILED, e.what());
}
}

View File

@ -195,9 +195,9 @@ namespace openvpn {
}
catch (const std::exception& e)
{
stop();
if (tun_persist)
tun_persist->close();
stop();
parent.tun_error(Error::TUN_SETUP_FAILED, e.what());
}
}