From 677dc62832742496f8419ddcc7c8baa166b7809a Mon Sep 17 00:00:00 2001 From: Serdar Dogruyol Date: Thu, 5 Oct 2017 19:29:35 +0300 Subject: [PATCH] Remove dead code for WebSocketHandler --- src/kemal/config.cr | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/kemal/config.cr b/src/kemal/config.cr index bb2fa86..30cbe2d 100644 --- a/src/kemal/config.cr +++ b/src/kemal/config.cr @@ -8,7 +8,6 @@ module Kemal INSTANCE = Config.new HANDLERS = [] of HTTP::Handler CUSTOM_HANDLERS = [] of Tuple(Nil | Int32, HTTP::Handler) - WEBSOCKET_HANDLERS = [] of HTTP::WebSocketHandler FILTER_HANDLERS = [] of HTTP::Handler ERROR_HANDLERS = {} of Int32 => HTTP::Server::Context, Exception -> String @@ -59,7 +58,6 @@ module Kemal @default_handlers_setup = false HANDLERS.clear CUSTOM_HANDLERS.clear - WEBSOCKET_HANDLERS.clear FILTER_HANDLERS.clear ERROR_HANDLERS.clear end @@ -81,10 +79,6 @@ module Kemal CUSTOM_HANDLERS << {position, handler} end - def add_handler(handler : HTTP::WebSocketHandler) - WEBSOCKET_HANDLERS << handler - end - def add_filter_handler(handler : HTTP::Handler) FILTER_HANDLERS << handler end @@ -145,7 +139,6 @@ module Kemal end end - # Handle WebSocketHandler private def setup_custom_handlers CUSTOM_HANDLERS.each do |ch| position = ch[0] @@ -159,12 +152,6 @@ module Kemal end end - private def setup_websocket_handlers - WEBSOCKET_HANDLERS.each do |h| - HANDLERS.insert(@handler_position, h) - end - end - private def setup_filter_handlers FILTER_HANDLERS.each do |h| HANDLERS.insert(@handler_position, h)