Remove unnecessary handler

This commit is contained in:
Serdar Dogruyol 2015-12-16 17:06:06 +02:00
parent 06ced7790b
commit 88c19f0051
3 changed files with 0 additions and 6 deletions

View file

@ -1,7 +1,6 @@
require "./spec_helper"
describe "Kemal::WebsocketHandler" do
it "doesn't match on wrong route" do
handler = Kemal::WebsocketHandler.new "/" { }
headers = HTTP::Headers{
@ -57,5 +56,4 @@ describe "Kemal::WebsocketHandler" do
response.headers["Sec-WebSocket-Accept"].should eq("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")
response.upgrade_handler.should_not be_nil
end
end

View file

@ -4,7 +4,6 @@ module Kemal
class Config
INSTANCE = Config.new
HANDLERS = [] of HTTP::Handler
WS_HANDLERS = [] of HTTP::Handler
property ssl, port, env, workers, public_folder
def initialize

View file

@ -1,8 +1,5 @@
class Kemal::WebsocketHandler < HTTP::WebSocketHandler
getter handler
def initialize(@path, &@proc : WebSocketSession ->)
@handler = @proc
Kemal.config.add_ws_handler self
end