Skip to content

Commit c1f86f1

Browse files
committed
fix: missing cancellation token
1 parent e1654ef commit c1f86f1

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.12.1] - 2024-08-21
11+
12+
### Changed
13+
14+
- Fixed a bug where the cancellation token would not be passed to the ParseNodeFactory.
15+
1016
## [1.12.0] - 2024-08-20
1117

1218
### Changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<!-- Common default project properties for ALL projects-->
33
<PropertyGroup>
4-
<VersionPrefix>1.12.0</VersionPrefix>
4+
<VersionPrefix>1.12.1</VersionPrefix>
55
<VersionSuffix></VersionSuffix>
66
<!-- This is overidden in test projects by setting to true-->
77
<IsTestProject>false</IsTestProject>

src/abstractions/serialization/ParseNodeProxyFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public async Task<IParseNode> GetRootParseNodeAsync(string contentType, Stream c
7979
{
8080
throw new Exception("IAsyncParseNodeFactory is required for async operations");
8181
}
82-
var node = await asyncConcrete.GetRootParseNodeAsync(contentType, content).ConfigureAwait(false);
82+
var node = await asyncConcrete.GetRootParseNodeAsync(contentType, content, cancellationToken).ConfigureAwait(false);
8383
WireParseNode(node);
8484
return node;
8585
}

src/serialization/form/FormParseNodeFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public async Task<IParseNode> GetRootParseNodeAsync(string contentType, Stream c
3939
throw new ArgumentNullException(nameof(content));
4040

4141
using var reader = new StreamReader(content);
42+
#if NET7_0_OR_GREATER
43+
var rawValue = await reader.ReadToEndAsync(cancellationToken).ConfigureAwait(false);
44+
#else
4245
var rawValue = await reader.ReadToEndAsync().ConfigureAwait(false);
46+
#endif
4347
return new FormParseNode(rawValue);
4448
}
4549
}

0 commit comments

Comments
 (0)