mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix udp recvfrom bug
This commit is contained in:
parent
3d34eb33e5
commit
aefd7fccd0
1 changed files with 3 additions and 0 deletions
|
@ -316,6 +316,9 @@ int SrsUdpMuxSocket::recvfrom(srs_utime_t timeout)
|
||||||
{
|
{
|
||||||
fromlen = sizeof(from);
|
fromlen = sizeof(from);
|
||||||
nread = srs_recvfrom(lfd, buf, nb_buf, (sockaddr*)&from, &fromlen, timeout);
|
nread = srs_recvfrom(lfd, buf, nb_buf, (sockaddr*)&from, &fromlen, timeout);
|
||||||
|
if (nread <= 0) {
|
||||||
|
return nread;
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the fast cache buffer size.
|
// Reset the fast cache buffer size.
|
||||||
cache_buffer_->set_size(nread);
|
cache_buffer_->set_size(nread);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue