jetzig-framework / jetzig

Jetzig is a web framework written in Zig
MIT License
457 stars 21 forks source link

Wrong assets sometimes delivered for the unaltered demo project #79

Closed rhues closed 3 months ago

rhues commented 3 months ago

There are two PNG files in the demo project: jetzig.png and zmpl.png. When running the unaltered demo project and continually refreshing the Chrome browser, sometimesjetzig.png will appear the same as zmpl.png as shown in the attached image. When checking Developer Tools Network tab, it does appear that the zmpl.png bits are being delivered when the request is for jetzig.png. This happens maybe 3% of the time when repeatedly refreshing the browser.

jetzig1

bobf commented 3 months ago

@rhues I believe this is fixed now. I was able to replicate by refreshing browser, then also with some scripted load testing.

I was using the request arena for allocations instead of response arena. Request arena lifetime is shorter than response so there was a non-zero chance of two active requests sharing the same arena. Thanks for reporting, feel free to re-open if you're able to replicate on latest main.

rhues commented 3 months ago

Confirmed the issue is fixed.