mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
The hybrid added in onReadCompleted reuses Cronet's ByteBuffer between reads to save a JNI wrap call when no grow is needed. That reuse breaks advance() — Cronet's position() is cumulative across reads, so the same K bytes get counted on every subsequent iteration. b.offset overshoots b.capacity, the reuse branch keeps firing on a now-empty buffer, and request.read() throws the original IllegalArgumentException again. Always pass a fresh wrap from wrapRemaining() so byteBuffer.position() reflects only this iteration's bytes. Same shape as the original PR had before the broken optimization was layered on top. |
||
|---|---|---|
| .. | ||
| app | ||
| fastlane | ||
| gradle | ||
| metadata/en-US | ||
| .gitignore | ||
| build.gradle | ||
| Gemfile | ||
| Gemfile.lock | ||
| gradle.properties | ||
| settings.gradle | ||