code: public void connect() throws IOException {
          SmbTransport trans;
          SmbSession ssn;
          UniAddress addr;
  
          if( isConnected() ) {
              return;
          }
  
          getUncPath0();
          getFirstAddress();
          for ( ;; ) {
              try {
                  doConnect();
                  return;
              } catch(SmbAuthException sae) {
                  throw sae; // Prevents account lockout on servers with multiple IPs
              } catch(SmbException se) {
                  if (getNextAddress() == null) 
                      throw se;
                  if (log.level >= 3)
                      se.printStackTrace(log);
              }
          }
      }
docs: It is not necessary to call this method directly. This is the
  <tt>URLConnection</tt> implementation of <tt>connect()</tt>.