mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-28 00:33:19 +00:00
MINOR: quic: EINTR error ignored
This should fix Coverity CID 375050 in GH #1536 where EINTR errno was ignored due to wrong do...while() loop usage.
This commit is contained in:
parent
3916ca197e
commit
439c464250
@ -233,14 +233,11 @@ void quic_sock_fd_iocb(int fd)
|
|||||||
do {
|
do {
|
||||||
ret = recvfrom(fd, dgram_buf, max_sz, 0,
|
ret = recvfrom(fd, dgram_buf, max_sz, 0,
|
||||||
(struct sockaddr *)&saddr, &saddrlen);
|
(struct sockaddr *)&saddr, &saddrlen);
|
||||||
if (ret < 0) {
|
if (ret < 0 && errno == EAGAIN) {
|
||||||
if (errno == EINTR)
|
|
||||||
continue;
|
|
||||||
if (errno == EAGAIN)
|
|
||||||
fd_cant_recv(fd);
|
fd_cant_recv(fd);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (ret < 0 && errno == EINTR);
|
||||||
|
|
||||||
b_add(buf, ret);
|
b_add(buf, ret);
|
||||||
if (!quic_lstnr_dgram_dispatch(dgram_buf, ret, l, &saddr,
|
if (!quic_lstnr_dgram_dispatch(dgram_buf, ret, l, &saddr,
|
||||||
|
Loading…
Reference in New Issue
Block a user