Re: git: b02e02958dad - main - libfetch: Fix handling of connection failures
- In reply to: Mark Johnston : "git: b02e02958dad - main - libfetch: Fix handling of connection failures"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Jul 2026 08:41:08 UTC
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