Tried to get rid of crashes on sequential vpn turn on/off
This commit is contained in:
parent
56754d616b
commit
9ca8c66c47
6 changed files with 18 additions and 10 deletions
|
@ -16,7 +16,7 @@ public:
|
|||
explicit IOSVpnProtocol(amnezia::Proto proto, const QJsonObject& configuration, QObject* parent = nullptr);
|
||||
static IOSVpnProtocol* instance();
|
||||
|
||||
virtual ~IOSVpnProtocol() = default;
|
||||
virtual ~IOSVpnProtocol() override = default;
|
||||
|
||||
bool initialize();
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ ErrorCode IOSVpnProtocol::start()
|
|||
|
||||
QString protocol = result["protocol"].toString();
|
||||
|
||||
if (!m_controller)
|
||||
initialize();
|
||||
|
||||
switch (m_protocol) {
|
||||
case amnezia::Proto::OpenVpn:
|
||||
if (currentProto != m_protocol) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue