@Override
    public boolean handleConnection(Socket socket) throws IOException {
      //noinspection IOResourceOpenedButNotSafelyClosed
      DataInputStream dataInputStream = new DataInputStream(socket.getInputStream());
      DataOutputStream out = new DataOutputStream(socket.getOutputStream());

      String command = new String(readDataBlock(dataInputStream), StandardCharsets.UTF_8);
      assert "getpass".equals(command) : "Invalid command: " + command;
      String uri = new String(readDataBlock(dataInputStream), StandardCharsets.UTF_8);
      String path = new String(readDataBlock(dataInputStream), StandardCharsets.UTF_8);
      String proposedLogin = new String(readDataBlock(dataInputStream), StandardCharsets.UTF_8);

      HgCommandAuthenticator authenticator = new HgCommandAuthenticator(myForceAuthorization, mySilentMode);
      boolean ok = authenticator.promptForAuthentication(myProject, proposedLogin, uri, path, myState);
      if (ok) {
        myAuthenticator = authenticator;
        sendDataBlock(out, authenticator.getUserName().getBytes(StandardCharsets.UTF_8));
        sendDataBlock(out, authenticator.getPassword().getBytes(StandardCharsets.UTF_8));
      }
      return true;
    }
@Override
    public boolean handleConnection(Socket socket)