Skip to content

Commit

Permalink
Fix binary incompatibility with RecyclableMemoryStream v3.0.0 (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
firenero authored May 25, 2024
1 parent 6e40d97 commit a871096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit a871096

Please sign in to comment.