Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 2026 10:41:08 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        src-committers@FreeBSD.org,  dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: b02e02958dad - main - libfetch: Fix handling of connection failures
Message-ID:  <86h5ljtskb.fsf@ltc.des.dev>
In-Reply-To: <6a67e584.32768.6fc20c11@gitrepo.freebsd.org> (Mark Johnston's message of "Mon, 27 Jul 2026 23:11:00 %2B0000")
References:  <6a67e584.32768.6fc20c11@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

Mark Johnston <markj@FreeBSD.org> writes:
>     libfetch: Fix handling of connection failures
>     
>     After commit 848f360c8f9a, if one tries to connect to a closed port,
>     fetch reports "Operation now in progress", which is rather confusing.
>     Return a more useful error message, restoring the old behaviour.

In hindsight this is still imperfect as it maps all connection failures
to ECONNREFUSED.  Is there a way to collect the correct error code,
e.g. by attempting a dummy write to the socket after receiving POLLHUP,
or will that just return EPIPE?

(it also leaks the socket descriptor, I should have noticed in review)

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86h5ljtskb.fsf>