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,
Thread.sleep(1)
}
}
stop()
packetProxy.clearTunnelHandle()
} catch (ex: InterruptedIOException) {
errorLogger?.logException(ex, false)
shouldRun = false
......@@ -257,6 +255,7 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
proxyThread?.interrupt()
nonPollableProxyThread?.interrupt()
exceptionCallbacks.clear()
packetProxy.clearTunnelHandle()
}
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