Use correct variable to save the number of bytes read in src/poll.cc
This commit is contained in:
parent
9328b9dd1c
commit
cac0c1e4c8
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue