Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/BufferStream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ function append_chunk(bs::BufferStream, data::AbstractVector{UInt8})
continue
end
bytes_to_write = min(space_available, length(data) - data_written)
push!(bs.chunks, data[data_written+1:data_written+bytes_to_write])
if data_written == 0 && bytes_to_write == length(data)
push!(bs.chunks, data)
else
push!(bs.chunks, data[data_written+1:data_written+bytes_to_write])
end
# Notify someone who was waiting for some data
lock(bs.read_cond) do
notify(bs.read_cond; all=false)
Expand Down
Loading