From 7a1f5dd2706069e55b5b0ca953a8b6c3e4762ce9 Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Sat, 15 Jul 2023 15:22:13 -0700 Subject: [PATCH] [api] Fixes ChunkedBytesSupplier read timeout bug (#2716) --- .../java/ai/djl/inference/streaming/ChunkedBytesSupplier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/ai/djl/inference/streaming/ChunkedBytesSupplier.java b/api/src/main/java/ai/djl/inference/streaming/ChunkedBytesSupplier.java index f0bcd078bbf..acd45362c37 100644 --- a/api/src/main/java/ai/djl/inference/streaming/ChunkedBytesSupplier.java +++ b/api/src/main/java/ai/djl/inference/streaming/ChunkedBytesSupplier.java @@ -50,10 +50,10 @@ public void appendContent(byte[] data, boolean lastChunk) { * @param lastChunk true if this is the last chunk */ public void appendContent(BytesSupplier bytesSupplier, boolean lastChunk) { - queue.offer(bytesSupplier); if (lastChunk) { completed.set(true); } + queue.offer(bytesSupplier); } /**