currentRequestCancelled property

bool get currentRequestCancelled

Whether the request whose handler is running in the current zone has been cancelled by its client. Handlers check it to stop early.

Implementation

bool get currentRequestCancelled {
  final operationId = Zone.current[#mcpOperationId] as String?;
  return operationId != null && isOperationCancelled(operationId);
}