Skip to content

Commit

Permalink
fix: count increase
Browse files Browse the repository at this point in the history
  • Loading branch information
koraykoska committed Oct 10, 2023
1 parent ac2aad2 commit ff2133b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/libwebsockets/WebsocketFrameSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ public struct WebsocketSimpleAppendFrameSequence: WebsocketFrameSequence {
_binaryBuffer.append(Data(count: max(bufferSize, frame.count)))
}

_count += frame.count
self._binaryBuffer.insert(contentsOf: frame, at: _count)
_count += frame.count
case .text:
if _textBuffer.count < _count + frame.count {
_textBuffer.append(Data(count: max(bufferSize, frame.count)))
}

_count += frame.count
self._textBuffer.insert(contentsOf: frame, at: _count)
_count += frame.count
default:
break
}
Expand Down

0 comments on commit ff2133b

Please sign in to comment.