mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/network: check ff_socket_nonblock() return and print a debug message
Fixes CID1026744 Fixes CID1026743 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0f02ea0afe
commit
7439475e69
|
@ -281,7 +281,9 @@ int ff_listen_bind(int fd, const struct sockaddr *addr,
|
|||
|
||||
closesocket(fd);
|
||||
|
||||
ff_socket_nonblock(ret, 1);
|
||||
if (ff_socket_nonblock(ret, 1) < 0)
|
||||
av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -293,7 +295,8 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
|
|||
int ret;
|
||||
socklen_t optlen;
|
||||
|
||||
ff_socket_nonblock(fd, 1);
|
||||
if (ff_socket_nonblock(fd, 1) < 0)
|
||||
av_log(NULL, AV_LOG_DEBUG, "ff_socket_nonblock failed\n");
|
||||
|
||||
while ((ret = connect(fd, addr, addrlen))) {
|
||||
ret = ff_neterrno();
|
||||
|
|
Loading…
Reference in New Issue