lib/faye/websocket/client.rb in faye-websocket-0.7.0 vs lib/faye/websocket/client.rb in faye-websocket-0.7.1

- old
+ new

@@ -7,11 +7,11 @@ attr_reader :headers, :status def initialize(url, protocols = nil, options = {}) @url = url @uri = URI.parse(url) - @driver = ::WebSocket::Driver.client(self, :protocols => protocols) + @driver = ::WebSocket::Driver.client(self, :max_length => options[:max_length], :protocols => protocols) [:open, :error].each do |event| @driver.on(event) do @headers = @driver.headers @status = @driver.status @@ -24,10 +24,10 @@ EventMachine.connect(@uri.host, port, Connection) do |conn| @stream = conn conn.parent = self end rescue => error - event = Event.new('error') + event = Event.new('error', :message => "Network error: #{url}: #{error.message}") event.init_event('error', false, false) dispatch_event(event) finalize(error.message, 1006) end