lib/linner/reactor.rb in linner-0.4.4 vs lib/linner/reactor.rb in linner-0.4.5
- old
+ new
@@ -14,14 +14,15 @@
super(host, port, &method(:on_connection))
end
def on_connection(connection)
while request = connection.request
- case request
- when Reel::Request
+ if request.websocket?
+ connection.detach
+ route_websocket request.websocket
+ return
+ else
route_request connection, request
- when Reel::WebSocket
- route_websocket request
end
end
end
def route_request(connection, request)