Commit 28ebcf7e authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't call stop() just because shouldRun is false - run() might be called...

Don't call stop() just because shouldRun is false - run() might be called again which would be impossible if fully stopped
parent a41bc4f4
...@@ -163,8 +163,6 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy, ...@@ -163,8 +163,6 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
Thread.sleep(1) Thread.sleep(1)
} }
} }
stop()
packetProxy.clearTunnelHandle()
} catch (ex: InterruptedIOException) { } catch (ex: InterruptedIOException) {
errorLogger?.logException(ex, false) errorLogger?.logException(ex, false)
shouldRun = false shouldRun = false
...@@ -257,6 +255,7 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy, ...@@ -257,6 +255,7 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
proxyThread?.interrupt() proxyThread?.interrupt()
nonPollableProxyThread?.interrupt() nonPollableProxyThread?.interrupt()
exceptionCallbacks.clear() exceptionCallbacks.clear()
packetProxy.clearTunnelHandle()
} }
private fun finalizeCleanup() { private fun finalizeCleanup() {
......
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