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, ...@@ -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 ) : recv( fd, p_data, i_data, 0 ) ) < 0 )
{ {
#if defined(WIN32) || defined(UNDER_CE) #if defined(WIN32) || defined(UNDER_CE)
if( WSAGetLastError() == WSAEWOULDBLOCK )
{
/* only happens with p_vs (SSL) - not really an error */
}
else
/* For udp only */ /* For udp only */
/* On win32 recv() will fail if the datagram doesn't fit inside /* On win32 recv() will fail if the datagram doesn't fit inside
* the passed buffer, even though the buffer will be filled with * the passed buffer, even though the buffer will be filled with
...@@ -454,6 +459,8 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs, ...@@ -454,6 +459,8 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
else else
msg_Err( p_this, "recv failed (%i)", WSAGetLastError() ); msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
#else #else
/* 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) ); msg_Err( p_this, "recv failed (%s)", strerror(errno) );
#endif #endif
return i_total > 0 ? i_total : -1; 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