Use correct variable to save the number of bytes read in src/poll.cc

This commit is contained in:
Aaro Altonen 2020-10-01 09:01:55 +03:00
parent 9328b9dd1c
commit cac0c1e4c8
1 changed files with 1 additions and 2 deletions

View File

@ -83,13 +83,12 @@ rtp_error_t uvg_rtp::poll::poll(std::vector<uvg_rtp::socket>& sockets, uint8_t *
}
for (size_t i = 0; i < sockets.size(); ++i) {
auto rtp_ret = sockets.at(i).recv((uint8_t *)buf, (int)buf_len, 0);
auto rtp_ret = sockets.at(i).recv((uint8_t *)buf, (int)buf_len, 0, bytes_read);
if (rtp_ret != RTP_OK) {
if (WSAGetLastError() == WSAEWOULDBLOCK)
continue;
} else {
set_bytes(bytes_read, ret);
return RTP_OK;
}
}