diff --git a/src/kemal/websocket.cr b/src/kemal/websocket.cr index a35b91a..28f58d3 100644 --- a/src/kemal/websocket.cr +++ b/src/kemal/websocket.cr @@ -39,13 +39,13 @@ module Kemal @proc.call(socket, context) socket.run rescue error : Exception + # TODO: check if 500 is what we're supposed to give + context.response.status_code = 500 + if error.is_a?(WebsocketError) - # TODO - context.response.status_code = 500 code = error.code.to_i16 message = error.status_message else - context.response.status_code = error.code code = 1011_i16 message = "Exception" end