class Playwright::WebSocketClient

def start

def start
  @driver.start
  Thread.new do
    wait_for_data until @ready_state >= STATE_CLOSING
  rescue EOFError
    # Google Chrome was gone.
    # We have nothing todo. Just finish polling.
    if @ready_state < STATE_CLOSING
      handle_on_close(reason: 'Going Away', code: 1001)
    end
  end
end