static void resetSocketAndLogExceptions(final @NotNull Socket socket) {
    if (!socket.isClosed()) {
      try {
        // initiate an abort on close to shut down the server's socket
        socket.setSoLinger(true, 0);
      } catch (Exception e) {
        logger.error("Error aborting socket ", e);
      }
      try {
        socket.close();
      } catch (Exception e) {
        logger.error("Error closing socket ", e);
      }
    }
  }
Forces a socket reset to avoid TIME_WAIT state.

@param socket to reset
geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpClient.java