Commit 6c290e9b authored by Daniel Wolf's avatar Daniel Wolf

Remove the logger when stopping completely

parent a508e312
......@@ -90,7 +90,7 @@ class ForwardedPacketStore(var logger: Logger?) {
}
@Throws(IOException::class)
fun clear() {
fun clear(completely:Boolean = false) {
logger?.fine("Clearing ForwardedPacketStore")
forwardedPollablePackets.forEach {
cleanup(it)
......@@ -108,6 +108,7 @@ class ForwardedPacketStore(var logger: Logger?) {
_forwardedPollablePackets.clear()
newlyForwardedPackets.clear()
newlyForwardedNonPollablePackets.clear()
if(completely) logger = null
}
}
......
......@@ -240,7 +240,7 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
packetProxy.stop()
cleanup()
if(!wasThreadRunning) {
forwardedPacketStore?.clear()
forwardedPacketStore?.clear(true)
forwardedPacketStore = null
}
tunnelHandle?.clear(true)
......@@ -265,7 +265,7 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
fileDescriptor.tryClosing()
}
pipesToClose.clear()
forwardedPacketStore?.clear()
forwardedPacketStore?.clear(proxyStopped)
tunnelHandle?.clear(false)
}
......
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