Skip to content

Commit

Permalink
Fixed stdin samples not being processed.
Browse files Browse the repository at this point in the history
  • Loading branch information
zberry committed Jul 30, 2019
1 parent ff80def commit 04a6a08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sample_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void StdinSampleSource::ScheduleRead() {
return;
}

block_.resize(block_.capacity());

auto self = shared_from_this();
stream_.async_read_some(boost::asio::buffer(block_.data() + used_, block_.size() - used_), [this, self](const boost::system::error_code &ec, std::size_t bytes_transferred) {
if (ec) {
Expand Down

0 comments on commit 04a6a08

Please sign in to comment.