source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Minor improvement to error handling: Once recv(2) suffered a
@ 2025-06-30 12:24 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2025-06-30 12:24 UTC (permalink / raw)
  To: source

Log Message:
-----------
Minor improvement to error handling:
Once recv(2) suffered a hard failure, there is no need to try again.

Modified Files:
--------------
    mandoc:
        catman.c

Revision Data
-------------
Index: catman.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/catman.c,v
diff -Lcatman.c -Lcatman.c -u -p -r1.28 -r1.29
--- catman.c
+++ catman.c
@@ -219,8 +219,10 @@ process_tree(int srv_fd, int dstdir_fd)
 				fflush(stderr);
 			}
 			inflight -= decr;
-			if (irc == 0)
+			if (irc == 0) {
 				errno = ECONNRESET;
+				inflight = -1;
+			}
 			if (errno != EAGAIN) {
 				warn("FATAL: recv");
 				fatal = errno;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-30 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-30 12:24 mandoc: Minor improvement to error handling: Once recv(2) suffered a schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).