Skip to content

Commit

Permalink
fix ws sending chunked packets
Browse files Browse the repository at this point in the history
  • Loading branch information
CypherPotato committed Feb 19, 2024
1 parent 5b95ab1 commit b17151a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Streams/HttpWebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private void SendInternal(ReadOnlyMemory<byte> buffer, WebSocketMessageType msgT
try
{
int totalLength = buffer.Length;
int chunks = Math.Max(totalLength / bufferLength, 1);
int chunks = (int)(Math.Ceiling((double)totalLength / bufferLength));

for (int i = 0; i < chunks; i++)
{
Expand Down

0 comments on commit b17151a

Please sign in to comment.