We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff32304 commit 32b7105Copy full SHA for 32b7105
src/main/java/ai/nightfall/scan/NightfallClient.java
@@ -29,6 +29,7 @@
29
import java.io.InputStream;
30
import java.time.Duration;
31
import java.time.Instant;
32
+import java.util.Arrays;
33
import java.util.UUID;
34
import java.util.concurrent.ExecutorService;
35
import java.util.concurrent.Executors;
@@ -218,6 +219,8 @@ private boolean doChunkedUpload(
218
219
if (bytesRead < data.length && notLastChunk) {
220
semaphore.release();
221
throw new NightfallClientException("failed to read data from input stream");
222
+ } else if (bytesRead < data.length) {
223
+ data = Arrays.copyOfRange(data, 0, bytesRead);
224
}
225
} catch (IOException e) {
226
0 commit comments