Having a bit of a WebSocket headache, I’ve followe...
# ktor
i
Having a bit of a WebSocket headache, I’ve followed the ChatApplication example[1] fairly closely, but when my browser attempts to send a message it gives me a
(index):77 WebSocket is already in CLOSING or CLOSED state
error. There is no indication that the
webSocket { … }
handler is called at all. Does anyone have any suggestions about how I can figure out why the server is closing the webSocket connection or failing to open it in the first place? [1] https://github.com/ktorio/ktor/blob/master/ktor-samples/ktor-samples-websocket/src/io/ktor/samples/chat/ChatApplication.kt
Oh, I can’t tell whether the WebSocket connection is being closed from the server or client, but I suspect the server is doing it because the same client code worked fine in the past.
Ok, client reports that it is closing with an error 1006, which indicates the socket was closed without a “close frame”, which suggests something low-level on the serverside
g
Having gone deep on trying to get ws running + testable on ktor, I'd wait until the next release. Seems like things are super in-flux. In the mean time I built a simple node app to terminate my ws stuff for now. Not ideal, but it's clearly not ready for prime time in 0.9.0
👍 1
i
Sorry about the slow reply - that’s disappointing but thank you.