lib/cucumber/pro/web_socket/session.rb in cucumber-pro-0.0.10 vs lib/cucumber/pro/web_socket/session.rb in cucumber-pro-0.0.11

- old
+ new

@@ -9,11 +9,11 @@ class Session def initialize(url, logger) @url, @logger = url, logger create_socket = -> worker { - ws = Faye::WebSocket::Client.new(@url, ping: 15) + ws = Faye::WebSocket::Client.new(@url, nil, ping: 15) ws.on :open, &worker.method(:on_open) ws.on :error, &worker.method(:on_error) ws.on :message, &worker.method(:on_message) ws.on :close, &worker.method(:on_close) ws @@ -111,11 +111,11 @@ end def on_close(event) logger.debug [:ws, :close] if access_denied?(event) - raise Error::AccessDenied.new + raise Error::AccessDenied.new end @ws = nil EM.stop_event_loop self end @@ -125,10 +125,10 @@ EM.next_tick { process_tasks } self end def access_denied?(event) - event.code == 1002 && + event.code == 1002 && event.reason == \ "Error during WebSocket handshake: Unexpected response code: 401" end end