title: Faye WebSocket, reconnect to socket after close handler gets triggered
body: <p>I have a super simple script that has pretty much what's on the Faye WebSocket GitHub page for handling closed connections:</p>
  
  <pre><code> ws = Faye::WebSocket::Client.new(url, nil, :headers =&gt; headers)
  
    ws.on :open do |event|
      p [:open]
      # send ping command
      # send test command
      #ws.send({command: 'test'}.to_json)
    end 
  
    ws.on :message do |event|
      # here is the entry point for data coming from the server.
      p JSON.parse(event.data)
    end 
  
    ws.on :close do |event|
      # connection has been closed callback.
      p [:close, event.code, event.reason]
      ws = nil 
    end 
  </code></pre>
  
  <p>Once the client is idle for 2 hours, the server closes the connection. I can't seem to find a way to reconnect to the server once <code>ws.on :close</code> is triggered. Is there an easy way of going about this? I just want it to trigger <code>ws.on :open</code> after <code>:close</code> goes off.</p>