public ResponsePacket writeRequestPacket(RequestPacket packet) throws SQLException {
  long start=System.currentTimeMillis();
  boolean useRouter=false;
  while (true) {
    if (!useRouter) {
      try {
        return writeRequestPacketInternal(packet);
      }
 catch (      RemoteException re) {
        sleep(1000);
        if (System.currentTimeMillis() - start > EXECUTE_RETRY_TIMEOUT) {
          useRouter=true;
        }
      }
    }
 else {
      reinitialize();
      start=System.currentTimeMillis();
      useRouter=false;
    }
  }
}

public ResponsePacket writeRequestPacket ( RequestPacket packet ) throws SQLException { long start = System . currentTimeMillis ( ) ; boolean useRouter = false ; while ( true ) { if ( ! useRouter ) { try { return writeRequestPacketInternal ( packet ) ; } catch ( RemoteException re ) { sleep ( 1000 ) ; if ( System . currentTimeMillis ( ) - start > EXECUTE_RETRY_TIMEOUT ) { useRouter = true ; } } } else { reinitialize ( ) ; start = System . currentTimeMillis ( ) ; useRouter = false ; } } }
this is the methods that writes the requestpacket into the socket
