Skip to content

Commit

Permalink
vtcp: Use VTIM_poll_timeout() in VTCP_read()
Browse files Browse the repository at this point in the history
  • Loading branch information
dridi committed Feb 2, 2024
1 parent b63237a commit 0ec80a0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/libvarnish/vtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,7 @@ VTCP_read(int fd, void *ptr, size_t len, vtim_dur tmo)
pfd[0].fd = fd;
pfd[0].events = POLLIN;
pfd[0].revents = 0;
j = (int)floor(tmo * 1e3);
if (j == 0)
j++;
j = poll(pfd, 1, j);
j = VTIM_poll_timeout(pfd, 1, tmo);
if (j == 0)
return (-2);
}
Expand Down

0 comments on commit 0ec80a0

Please sign in to comment.