Every three minutes, I get "rwhod: recv: Connection refused" in my logs.
Looking at the source, rwhod is doing this, much as you'd expect:
cc = recvfrom(s, (char *)&wd, sizeof (struct whod), 0,
&from, &len);
if (cc <= 0) {
if (cc < 0 && errno != EINTR)
syslog(LOG_WARNING, "recv: %m");
continue;
}
... and it has an alarm set to wake it up after three minutes so it can
transmit.
Now, as far as I can see, it looks as through recvfrom() is returning
ECONNREFUSED instead of EINTR when it's interrupted by the alarm.
Certainly it doesn't seem to make a lot of sense for recvfrom() to ever
return ECONNREFUSED normally. Am I doing something obviously wrong, and
has anybody else seen this?
P.