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

Fix waitpipe error handling in net_Accept()

from fdb990bd.
Spotted by Laurent.
parent c6ea17a3
...@@ -297,10 +297,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait ) ...@@ -297,10 +297,8 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
ufd[i].events = POLLIN; ufd[i].events = POLLIN;
ufd[i].revents = 0; ufd[i].revents = 0;
} }
if (evfd == -1)
n--; /* avoid EBADF */
switch (poll (ufd, n, timeout)) switch (poll (ufd, n + (evfd != -1), timeout))
{ {
case -1: case -1:
if (net_errno == EINTR) if (net_errno == EINTR)
......
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