• bl_r@lemmy.dbzer0.com
    cake
    link
    fedilink
    arrow-up
    12
    ·
    2 months ago

    I’ve run into the same problem with an API server I wrote in rust. I noticed this bug 5 minutes before a demo and panicked, but fixed it with a 1 second sleep. Eventually, I implemented a more permanent fix by changing the simplistic io calls to ones better designed for streams

    • dfyxA
      link
      fedilink
      arrow-up
      7
      ·
      2 months ago

      The actual recommended solution is to just read in a loop until you have everything.