public static void exit(boolean close)
	{
		Utils.logger.log(Level.INFO, "Exiting main frame...");
		Utils.setThreadUpdater(false);
		try
		{
			if(mainFrame != null)
				mainFrame.dispose();
		}
		catch(Exception ignored)
		{
		}
		try
		{
			socket.close();
		}
		catch(Exception ignored)
		{
		}
		try
		{
			Thread.sleep(250);
		}
		catch(InterruptedException e)
		{
			e.printStackTrace();
		}
		socket = null;
		try
		{
			Thread.sleep(250);
		}
		catch(InterruptedException e)
		{
			e.printStackTrace();
		}
		if(close)
			System.exit(0);
	}