private void processOneConnection(Socket socket, final long startTime, DataInputStream input)
      throws IOException, UnsupportedSerializationVersionException, ClassNotFoundException {
    final int gossipVersion = readGossipVersion(input);
    if (!(gossipVersion == GOSSIPVERSION || gossipVersion == OLDGOSSIPVERSION)) {
      rejectUnknownProtocolConnection(socket, gossipVersion);
      return;
    }

    final short versionOrdinal;
    if (gossipVersion == OLDGOSSIPVERSION) {
      // Even newer clients use OLDGOSSIPVERSION for initial connection
      versionOrdinal = KnownVersion.OLDEST.ordinal();
    } else {
      // Recent versions of TcpClient will send the version ordinal
      versionOrdinal = input.readShort();
    }

    if (logger.isDebugEnabled() && versionOrdinal != KnownVersion.CURRENT_ORDINAL) {
      logger.debug("Locator reading request from " + socket.getInetAddress() + " with version "
          + Versioning.getVersion(versionOrdinal));
    }
    final KnownVersion version = Versioning.getKnownVersionOrDefault(
        Versioning.getVersion(versionOrdinal), null);
    if (version == null) {
      throw new UnsupportedSerializationVersionException(
          KnownVersion.unsupportedVersionMessage(versionOrdinal));
    }
    input = new VersionedDataInputStream(input, version);
    final Object request = objectDeserializer.readObject(input);
    if (logger.isDebugEnabled()) {
      logger.debug("Locator received request " + request + " from " + socket.getInetAddress());
    }
    final Object response;
    if (request instanceof ShutdownRequest) {
      shuttingDown = true;
      // Don't call shutdown from within the worker thread, see java bug #6576792.
      // Closing the socket will cause our acceptor thread to shutdown the executor
      srv_sock.close();
      response = new ShutdownResponse();
    } else if (request instanceof VersionRequest) {
      response = handleVersionRequest();
    } else {
      response = handler.processRequest(request);
    }

    handler.endRequest(request, startTime);

    final long startTime2 = nanoTimeSupplier.getAsLong();
    if (response != null) {
      DataOutputStream output = new DataOutputStream(socket.getOutputStream());
      if (version != KnownVersion.CURRENT) {
        output = new VersionedDataOutputStream(output, version);
      }
      objectSerializer.writeObject(response, output);
      output.flush();
    }

    handler.endResponse(request, startTime2);
  }
fix for bug 33711 - client requests are spun off to another thread for processing. Requests are
synchronized in processGossip.
geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java