Send only read data during large file transfers

This commit is contained in:
Matéo Duparc 2021-07-15 10:50:57 +02:00
parent 4cb127004f
commit f186dbd0cb
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E
2 changed files with 3 additions and 3 deletions

View File

@ -566,8 +566,8 @@ class AIRAService : Service() {
0
}
filesSender.nextChunk = if (read > 0) {
filesSender.lastChunkSizes.add(nextChunk.size)
session.encrypt(nextChunk, usePadding)
filesSender.lastChunkSizes.add(read+1)
session.encrypt(nextChunk.sliceArray(0 until read+1), usePadding)
} else {
null
}

View File

@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}