Commit 4478fbaf authored by Daniel Wolf's avatar Daniel Wolf

inline

parent 9d964d51
......@@ -218,10 +218,9 @@ open class VPNTunnelProxy(val packetProxy: PacketProxy,
val readSize = deviceInput.read(packetFromDevice)
if (readSize != -1) {
val writeToken = tunnelHandle?.issueDeviceWriteToken() ?: return
val actualPacketFromDevice = packetFromDevice.copyOfRange(0, readSize)
trafficStats.packetsReceivedFromDevice++
trafficStats.bytesFromDevice += actualPacketFromDevice.size
packetProxy.processDevicePacket(writeToken, actualPacketFromDevice)
trafficStats.bytesFromDevice += readSize
packetProxy.processDevicePacket(writeToken, packetFromDevice.copyOfRange(0, readSize))
}
}
......
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