From cac0c1e4c8ff1ce3d35e61905e0afedbd6c626ed Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Thu, 1 Oct 2020 09:01:55 +0300 Subject: [PATCH] Use correct variable to save the number of bytes read in src/poll.cc --- src/poll.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/poll.cc b/src/poll.cc index f54a3b4..d5f1cb5 100644 --- a/src/poll.cc +++ b/src/poll.cc @@ -83,13 +83,12 @@ rtp_error_t uvg_rtp::poll::poll(std::vector& 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; } }