Багфикс

This commit is contained in:
serega6531
2020-04-14 13:02:06 +03:00
parent ba5ec0e86d
commit 6976253666

View File

@@ -162,6 +162,7 @@ public class StreamOptimizer {
if (checkCompleteChunk(chunk, start)) { if (checkCompleteChunk(chunk, start)) {
chunkStarted = false; chunkStarted = false;
chunk.clear(); chunk.clear();
i = start + 1;
} }
} else { } else {
chunkStarted = false; chunkStarted = false;
@@ -172,6 +173,7 @@ public class StreamOptimizer {
if (checkCompleteChunk(chunk, start)) { if (checkCompleteChunk(chunk, start)) {
chunkStarted = false; chunkStarted = false;
chunk.clear(); chunk.clear();
i = start + 1;
} }
} }
} }
@@ -203,9 +205,6 @@ public class StreamOptimizer {
final int chunkSize = Integer.parseInt(found, 16); final int chunkSize = Integer.parseInt(found, 16);
if (chunkSize == 0) { // конец потока чанков if (chunkSize == 0) { // конец потока чанков
output.write('\r');
output.write('\n');
Packet result = Packet.builder() Packet result = Packet.builder()
.incoming(false) .incoming(false)
.timestamp(chunk.get(0).getTimestamp()) .timestamp(chunk.get(0).getTimestamp())
@@ -354,7 +353,7 @@ public class StreamOptimizer {
.content(newContent) .content(newContent)
.build(); .build();
} catch (ZipException e) { } catch (ZipException e) {
log.warn("Failed to decompress gzip, leaving as it is", e); log.warn("Failed to decompress gzip, leaving as it is: {}", e.getMessage());
} catch (IOException e) { } catch (IOException e) {
log.error("decompress gzip", e); log.error("decompress gzip", e);
} }