Commit 0bef6863 authored by Alessandro Rubini's avatar Alessandro Rubini

wrs-socket: use POLLERR for timestamps

While the manual pages say nothing, https://lwn.net/Articles/291793/
hints that we should use POLLERR instead of POLLIN.

I hoped to get rid of some of the poll messages, but nothing changes
in simple tests. I hope we get rid of the EAGAIN in the later recvmsg()
(likely with POLLIN we got the socket as readable, but nothing was
in the error queue -- we had a new incoming frame instead).
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ed2122f4
......@@ -368,7 +368,7 @@ static void poll_tx_timestamp(struct pp_instance *ppi, void *pkt, int len,
t->seconds = t->correct = 0;
pfd.fd = fd;
pfd.events = POLLIN;
pfd.events = POLLERR;
while (1) { /* Not forever: we break after a few runs */
errno = 0;
res = poll(&pfd, 1, 20 /* ms */);
......
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