     console.log "rcon disconnected for "+instance.id
     if connecting
       console.log "configuring server failed!!!"
-  ).on('error', console.log)
+      handleFailConfigure serverObj, lobby, instance
+  ).on 'error', (err)->
+    if err.errno is 'ETIMEDOUT'
+      console.log "RCON failed connection to server "+instance.ip+":"+instance.port
+      handleFailConfigure serverObj, lobby, instance
 
 launchServer = (serv, lobby)->
   id = idCounter

  launchServer(chosen, nextGame.lobby)
  lobbyQueue.remove({_id: nextGame._id})

@hostServer = new ws({port: 3006})
hostServer.on 'connection', (ws)->
  serverObj =
    maxLobbies: 0
    activeLobbies: []
    ip: ""
  ourID = null
  console.log "new server connected"
  ws.on 'close', ->

    started: new Date().getTime()
  console.log "server launched, id: "+id+" waiting for configure"

handleFailConfigure = (serv, lobby, instance)->
  console.log "failed to configure server, re-queuing lobby and disabling server"
  removeServerFromPool serv._id
  pendingInstances.remove {id: instance.id}
  lobbyQueue.remove {lobby: lobby._id}
  startFindServer lobby._id

finalizeInstance = (serv, lobby, instance)->
  lobbies.update {_id: lobby._id}, {$set: {status: 3, serverIP: serv.ip+":"+instance.port}}
  pendingInstances.remove {id: instance.id}
