We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33a1986 commit 4e2d73cCopy full SHA for 4e2d73c
src/MongoDB.Driver/Core/Connections/BinaryConnection.cs
@@ -463,7 +463,7 @@ public async Task<ResponseMessage> ReceiveMessageAsync(
463
private int GetResponseTo(IByteBuffer message)
464
{
465
var backingBytes = message.AccessBackingBytes(8);
466
- return BitConverter.ToInt32(backingBytes.Array, backingBytes.Offset);
+ return BinaryPrimitives.ReadInt32LittleEndian(backingBytes.Array.AsSpan().Slice(backingBytes.Offset, 4));
467
}
468
469
private void SendBuffer(OperationContext operationContext, IByteBuffer buffer)
0 commit comments