Skip to content

Commit

Permalink
Fix potential outgoing message corruption in managed websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
fealebenpae authored Sep 16, 2024
1 parent 9a82cf2 commit ccffa2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Realm/Realm/Native/SyncSocketProvider.WebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public async void Write(BinaryValue data, IntPtr native_callback)

try
{
await _webSocket.SendAsync(new(buffer), WebSocketMessageType.Binary, true, _cancellationToken);
await _webSocket.SendAsync(new(buffer, 0, (int)data.size), WebSocketMessageType.Binary, true, _cancellationToken);
}
catch (Exception e)
{
Expand Down

0 comments on commit ccffa2f

Please sign in to comment.