Closed aboisvert closed 3 years ago
See PR https://github.com/olliNiinivaara/GuildenStern/pull/3 that fixes the issue for me.
Thank you for the fix.
It's about time I start writing some tests for this project!
I'm planning to add an optional callback to closeSocket that will report the reason why socket was closed. This callback should make debugging easier, and it should be useful also when managing websocket sessions (cookie data etc). (It is possible that your "unregister" gets merged to "closeSocket" in the process...)
Thanks again, all comments, contributions and feature requests are highly appreciated.
GuildenStern seems to produce empty responses under multithreading.
I've created a small self-contained project to reproduce this at https://github.com/aboisvert/guildenbug
How to reproduce
1) Build the project with
nimble build
2) Run the executable./guildenbug
3) Go to http://localhost:8080 with your browser.You should see the following appears:
This illustrates that
foo1.js
,foo2.js
andfoo3.js
were all loaded correctly.4) Keep refreshing and sometimes you should see fewer line items, indicating that one (or more) of the 3 javascript files was (were) not loaded correctly.
In Chrome, the error shows up as
(failed) net::ERR_EMPTY_RESPONSE
in the Developer Tools network tab. Alternatively, the console will also report the error asGET http://localhost:8080/foo1.js net::ERR_EMPTY_RESPONSE