Github user pivotal-amurmann commented on a diff in the pull request: https://github.com/apache/geode/pull/716#discussion_r133844781 --- Diff: geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java --- @@ -334,42 +342,46 @@ protected void run() { * fix for bug 33711 - client requests are spun off to another thread for processing. Requests are * synchronized in processGossip. */ - private void processRequest(final Socket sock) { + private void processRequest(final Socket socket) { executor.execute(() -> { long startTime = DistributionStats.getStatTime(); DataInputStream input = null; Object request, response; try { - sock.setSoTimeout(READ_TIMEOUT); - getSocketCreator().configureServerSSLSocket(sock); + socket.setSoTimeout(READ_TIMEOUT); + getSocketCreator().configureServerSSLSocket(socket); try { - input = new DataInputStream(sock.getInputStream()); + input = new DataInputStream(socket.getInputStream()); } catch (StreamCorruptedException e) { // Some garbage can be left on the socket stream // if a peer disappears at exactly the wrong moment. log.debug("Discarding illegal request from " - + (sock.getInetAddress().getHostAddress() + ":" + sock.getPort()), e); + + (socket.getInetAddress().getHostAddress() + ":" + socket.getPort()), e); return; } - int gossipVersion = readGossipVersion(sock, input); + int gossipVersion = readGossipVersion(socket, input); short versionOrdinal; + if (gossipVersion == NON_GOSSIP_REQUEST_VERSION) { + if (input.readUnsignedByte() == AcceptorImpl.PROTOBUF_CLIENT_SERVER_PROTOCOL + && Boolean.getBoolean("geode.feature-protobuf-protocol")) { + ClientProtocolMessageHandler messageHandler = ClientProtocolMessageHandlerLoader.load(); --- End diff -- I would really like to have this constant only defined once. Agreed that AcceptorImpl is a bad spot for that. What would be a good spot?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---