Skip to content

Commit

Permalink
vtcp: Use VTIM_poll_tmo() in VTCP_read()
Browse files Browse the repository at this point in the history
  • Loading branch information
dridi committed Feb 5, 2024
1 parent f383b5c commit 33e69f0
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 = poll(pfd, 1, VTIM_poll_tmo(tmo));
if (j == 0)
return (-2);
}
Expand Down

0 comments on commit 33e69f0

Please sign in to comment.