code: public OtpConnection accept() throws IOException, OtpAuthException {
          OtpTransport newsock = null;
  
          while (true) {
              try {
                  newsock = sock.accept();
                  return new OtpConnection(this, newsock);
              } catch (final IOException e) {
                  try {
                      if (newsock != null) {
                          newsock.close();
                      }
                  } catch (final IOException f) {/* ignore close errors */
                  }
                  throw e;
              }
          }
      }
docs: Accept an incoming connection from a remote node. A call to this method
  will block until an incoming connection is at least attempted.
  
  @return a connection to a remote node.
  
  @exception java.io.IOException
  if a remote node attempted to connect but no common
  protocol was found.
  
  @exception OtpAuthException
  if a remote node attempted to connect, but was not
  authorized to connect.