Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix binary incompatibility with RecyclableMemoryStream v3.0.0 #247

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/EfficientDynamoDb/Internal/ErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using EfficientDynamoDb.Internal.Operations.Shared;
using EfficientDynamoDb.Internal.Reader;
using EfficientDynamoDb.Operations.Shared;
using Microsoft.IO;

namespace EfficientDynamoDb.Internal
{
Expand All @@ -29,7 +30,7 @@ public static async Task ProcessErrorAsync(DynamoDbContextMetadata metadata, Htt
if (response.StatusCode == HttpStatusCode.ServiceUnavailable)
throw new ServiceUnavailableException("DynamoDB is currently unavailable. (This should be a temporary state.)");

var recyclableStream = DynamoDbHttpContent.MemoryStreamManager.GetStream();
var recyclableStream = new RecyclableMemoryStream(DynamoDbHttpContent.MemoryStreamManager);
try
{
await responseStream.CopyToAsync(recyclableStream, cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private async Task<Stream> CreatePooledContentReadStreamAsync()
if (_pooledContentStream != null)
return _pooledContentStream;

_pooledContentStream = MemoryStreamManager.GetStream();
_pooledContentStream = new RecyclableMemoryStream(MemoryStreamManager);

await SerializeToStreamAsync(_pooledContentStream, null).ConfigureAwait(false);

Expand Down
Loading