I have an issue with `forEachPart` getting stuck. ...
# ktor
r
I have an issue with
forEachPart
getting stuck. Specifically, my client sends 2 parts (metadata + the file itself) And the foreach look receives both, but it then gets stuck on the non-existing next part and doesn't break. If I just replace this loop with two calls to
readPart()
, then both parts are read fine and I get the entire payload. It does not happen for smaller file sizes. Possible related issue: https://kotlinlang.slack.com/archives/C0A974TJ9/p1726667475676989
a
Are you able to reproduce the problem with Ktor 3.0.0-beta-2?
r
just tried, yep it still happens with beta-2
a
Can you please file an issue with a code snippet attached?
👍 1
r
Created: https://youtrack.jetbrains.com/issue/KTOR-7500/MultiPartData.readPart-does-not-return-null-when-stream-ends (dont know how to update the affected versions on the right hand side though, it's in 3.0.0)