floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.63k stars 472 forks source link

sokol_fetch.h: fetch response callback called with 'cancelled' flag but not the 'finished' one #882

Closed guillaumeblanc closed 10 months ago

guillaumeblanc commented 10 months ago

Hi,

When sfetch_cancel is called between sfetch_send and sfetch_dowork, then the response callback is called with cancelled flag but not finished. This behavior differs from documentation and makes fetch callback implementation less straightforward.

I modified sokol fetch unit tests to reproduce a functional behavior that doesn't match with documentation, submitted as PR #881

Side note: Thanks for the incredibly well thought, easy to use and yet very efficient sokol APIs.

Cheers, Guillaume

floooh commented 10 months ago

Ok fixed via #898