Fix a bug where polling messages would not work properly

pull/4/head
Paul Hollinsky 2018-10-22 16:19:20 -04:00
parent 319bd09cb4
commit 6456d4e261
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ bool Device::getMessages(std::vector<std::shared_ptr<Message>>& container, size_
if(limit > (pollingContainer.size_approx() + 4))
limit = (pollingContainer.size_approx() + 4);
if(container.capacity() < limit)
if(container.size() < limit)
container.resize(limit);
size_t actuallyRead = pollingContainer.try_dequeue_bulk(container.data(), limit);