protected void onDisconnect()
	{
		int tries = 0;
		while (tries < 1000 && !isConnected())
		{
			try
			{
				connect(ServerName, ServerPort, ServerPassword);
			} catch (Exception e)
			{
				this.log("Connection attempt " + tries + " failed.");
				tries++;
				if (tries >= 1000000)
					System.exit(0);
			}
		} // while
	}