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:
parent
aa26213b3e
commit
aa92a7a522
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user