/*
* Write of 0 bytes means an OS bug, and we just discard this packet.
*/
- if (rcode == 0) goto discard;
+ if (rcode == 0) {
+ RATE_LIMIT_GLOBAL(ERROR, "Discarding packet due to write returning zero for socket %s",
+ s->listen->name);
+ goto discard;
+ }
/*
* Or we have a write error.
return;
}
+ PERROR("Failed writing to socket %s", s->listen->name);
+
/*
* As a special hack, check for something
* that will never be returned from a
*/
if ((errno == ECONNREFUSED) || (errno == ECONNRESET)) goto dead;
- PERROR("Failed writing to socket %s", s->listen->name);
if (li->app_io->error) li->app_io->error(li);
dead:
case FR_TAC_PLUS_AUTHOR:
if (pkt->author_reply.status == FR_TAC_PLUS_AUTHOR_STATUS_ERROR) {
close_it:
- DEBUG("Closing connection due to unrecoverable server error response");
+ ERROR("tavacs %s - Closing connection due to unrecoverable server error response",
+ thread->name);
errno = ECONNRESET;
return -1;
}