ring 2024-03-22

Just wondering if I'm having a brainfart or not. I'm experimenting with websockets. When I use the testcode for the jetty adapter for any of the websockets, this works just fine. But as soon as the jetty server config has :async true set as option any request takes atleast 60 seconds before anything happens. For example if I use this code without the surrounding clojure.test functions it obviously works fine, but when I add async true it stalls like explained. Even when I make the handler have respond raise etc. What am I doing wrong here? https://github.com/ring-clojure/ring/blob/f6cc0724d1f8ac1fbfdf7bad7ea9b778f80f7da2/ring-jetty-adapter/test/ring/adapter/test/jetty.clj#L806

This should now be fixed in 1.12.1.

🙌 1

That would be :async? true ofcourse

are you talking directly to jetty or going through any kind of proxy?

Exactly like in the test fn. Even without hato from a browser, same results

60 seconds is suspiciously like a default timeout value

Exactly what I thought. Already tried setting async-timeout to 0 explicitely

ring is failing to call complete on the async context looks like

https://downey.family/p/2024-03-22/jetty-test.clj.html is a little reproducer, it monkey patches ring to call complete, but if you comment out the monkey patch it hangs

Interesting, will try this

Gave it a thumbs up, thanks

Thanks for the report. I was wondering how this could have gotten past the tests, but it looks like websockets with async was never put in! I'll update and release a patch.

🎉 3