luminus-framework/ring-undertow-adapter

Abnormal WebSocket close not handled

alandipert opened this issue · 4 comments

This is an upstream issue, and not an issue with ring-undertow-adapter, but I thought to drop a note here so that other people could look at it. It could also be worked around here or in client code in different ways.

The Undertow issue is this: https://issues.redhat.com/browse/UNDERTOW-1934

Basically, if you pull out your ethernet cable and the WebSocket is closed abnormally, none of your :on-close, :on-close-message, or :on-error WebSocket callbacks are called. Normal WebSocket closure - when the client sends a CLOSE frame, like when you close the tab in Chrome - works fine.

Thanks for your help, this is resolved in release 1.2.4

Hm, this hasn't been fixed yet in Undertow (https://issues.redhat.com/browse/UNDERTOW-1934 is still open), so I'm pretty sure this isn't resolved yet.

Seems to be fixed in 2.2.19.Final. I can verify it seems to work. Killing client with kill -9 results in "onClose" in Undertow and we get callback properly. Nothing happens with 2.2.18.Final.

Thanks. Pushed up a release with 2.2.20.Final.

Closing issue for now, if the issue persists please reopen it