           callback.call(@, host, port)
         else
           @log "Failed to determine which server to use: #{dataStr}"
-          @onError new Error 'Error parsing server response'
+          @disconnect new Error 'Error parsing server response'
     .on 'error', (e) =>
       @log "whichServer error: #{e}"
-      @onError e
+      @disconnect e
 
 
   setTmpSong: (data) ->

    else
      activity = @lastActivity
    if @_isConnected and (Date.now() - activity) > @disconnectInterval
      @_isAuthenticated = false
      @_isConnected = false
      @log 'No response from server; is there a proxy/firewall problem?'
      @onError new Error 'No response from server'
    else
      @updatePresence()


      url  = "ws://#{host}:#{port}/socket.io/websocket"
      @ws = new WebSocket(url)
      @ws.onmessage = @onMessage.bind(@)
      @ws.onerror = @disconnect.bind(@)
      @ws.onclose = @onClose.bind(@)

  whichServer: (roomid, callback) ->
