@Override
	public void run()
	{
		ArrayList<Socket> sockets = new ArrayList<Socket>();
		init();
		while(!stop.get())
		{
			try
			{
				Socket clientSocket = serverSocket.accept();
				Proxy proxy = new Proxy(clientSocket, config, stop);
				sockets.add(clientSocket);
				pool.execute(proxy);
			} 
			catch(SocketException se)
			{
				pool.shutdownNow();
				datagramSocket.close();
				for(Socket s: sockets)
				{
					try
					{
						s.close();
					} 
					catch (IOException e)
					{
						e.printStackTrace();
					}
				}
				return;
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
		}
	}