} catch (IOException ioe) { exception = ioe; }  if (close  &&  sock != null) { try { sock.close(); } catch (IOException ioe) { } sock = null; } }
}
	public void run()	{	    try	    {		if (Socks_client != null)		    sock = Socks_client.getSocket(actual_host, actual_port);		else		{		    // try all A records		    InetAddress[] addr_list = InetAddress.getAllByName(actual_host);		    for (int idx=0; idx<addr_list.length; idx++)		    {			try			{			    if (LocalAddr == null)				sock = new Socket(addr_list[idx], actual_port);			    else				sock = new Socket(addr_list[idx], actual_port,						  LocalAddr, LocalPort);			    break;		// success			}			catch (SocketException se)			{			    if (idx == addr_list.length-1  ||  close)				throw se;	// we tried them all			}		    }		}	    }	    catch (IOException ioe)	    {		exception = ioe;	    }	    if (close  &&  sock != null)	    {		try		    { sock.close(); }		catch (IOException ioe)		    { }		sock = null;	    }	}