diff --git a/Neo4j.Driver/Neo4j.Driver/Internal/Driver.cs b/Neo4j.Driver/Neo4j.Driver/Internal/Driver.cs index 6d6fab117..af8140a9c 100644 --- a/Neo4j.Driver/Neo4j.Driver/Internal/Driver.cs +++ b/Neo4j.Driver/Neo4j.Driver/Internal/Driver.cs @@ -156,7 +156,7 @@ CancellationToken cancellationToken { async Task Process(IAsyncEnumerable records) { - await foreach (var record in records.ConfigureAwait(false)) + await foreach (var record in records.ConfigureAwait(false).WithCancellation(cancellationToken)) { streamProcessor(record); }