mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Seperate websocket and websocket handler. Fixes #395
This commit is contained in:
parent
3050b75f0a
commit
fe9d193418
10 changed files with 76 additions and 39 deletions
|
@ -48,8 +48,7 @@ def create_ws_request_and_return_io(handler, request)
|
|||
rescue IO::Error
|
||||
# Raises because the IO::Memory is empty
|
||||
end
|
||||
response.close
|
||||
io
|
||||
io.rewind
|
||||
end
|
||||
|
||||
def call_request_on_app(request)
|
||||
|
@ -83,5 +82,5 @@ end
|
|||
Spec.after_each do
|
||||
Kemal.config.clear
|
||||
Kemal::RouteHandler::INSTANCE.http_routes = Radix::Tree(Route).new
|
||||
Kemal::RouteHandler::INSTANCE.ws_routes = Radix::Tree(String).new
|
||||
Kemal::WebSocketHandler::INSTANCE.ws_routes = Radix::Tree(WebSocket).new
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue