public void run(){
  try {
    try {
      Socket temp=factory.createSocket(host,port);
synchronized (this) {
        socket=temp;
        notify();
      }
      rememberFactory(host,factory);
synchronized (this) {
        if (cleanUp)         try {
          socket.close();
        }
 catch (        IOException e) {
        }
      }
    }
 catch (    Exception e) {
synchronized (this) {
        exception=e;
        notify();
      }
    }
  }
  finally {
  }
}

public void run ( ) { try { try { Socket temp = factory . createSocket ( host , port ) ; synchronized ( this ) { socket = temp ; notify ( ) ; } rememberFactory ( host , factory ) ; synchronized ( this ) { if ( cleanUp ) try { socket . close ( ) ; } catch ( IOException e ) { } } } catch ( Exception e ) { synchronized ( this ) { exception = e ; notify ( ) ; } } } finally { } }
attempt socket connection in separate thread . if successful , notify master waiting ,
