lib/angelo/responder/websocket.rb in angelo-0.3.3 vs lib/angelo/responder/websocket.rb in angelo-0.4.0

- old
+ new

@@ -20,13 +20,12 @@ def handle_request begin if @response_handler Angelo.log @connection, @request, @websocket, :switching_protocols - @bound_response_handler ||= @response_handler.bind @base @websocket.on_pong &Responder::Websocket.on_pong @base.filter :before - @bound_response_handler[@websocket] + @base.instance_exec(@websocket, &@response_handler) @base.filter :after else raise NotImplementedError end rescue IOError => ioe