@Override
  public Object attempt(final Connection connection) throws Exception {
    final Socket socket = connection.getSocket();
    final int previousTimeoutMs = socket.getSoTimeout();
    final int timeoutMs = getTimeoutMs();
    final boolean changeTimeout = previousTimeoutMs != timeoutMs;
    if (changeTimeout) {
      socket.setSoTimeout(timeoutMs);
    }
    try {
      return super.attempt(connection);
    } finally {
      if (changeTimeout) {
        socket.setSoTimeout(previousTimeoutMs);
      }
    }
  }
Derivatives of this class can have an alternative socket timeout from the default connection
timeout.
geode-core/src/main/java/org/apache/geode/cache/client/internal/AbstractOpWithTimeout.java