Commit 9384f8b2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't print an error message when attempting to recv returns EAGAIN

(can only happens if we're using SSL and it is a not an error situation)
parent f34b83de
......@@ -441,6 +441,11 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
: recv( fd, p_data, i_data, 0 ) ) < 0 )
{
#if defined(WIN32) || defined(UNDER_CE)
if( WSAGetLastError() == WSAEWOULDBLOCK )
{
/* only happens with p_vs (SSL) - not really an error */
}
else
/* For udp only */
/* On win32 recv() will fail if the datagram doesn't fit inside
* the passed buffer, even though the buffer will be filled with
......@@ -454,7 +459,9 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
else
msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
#else
msg_Err( p_this, "recv failed (%s)", strerror(errno) );
/* EAGAIN only happens with p_vs (SSL) and it's not an error */
if( errno != EAGAIN )
msg_Err( p_this, "recv failed (%s)", strerror(errno) );
#endif
return i_total > 0 ? i_total : -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment