feat(log): the launcher's log names the addresses each connection resolved to and tried, and how each ended #106
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!106
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:feat/log-connections"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Players can't reach git.magicbean.dev from the launcher, and #93's log still leaves the main cause open. A timeout reads the same whether it's broken IPv6, an ISP dropping Cloudflare's addresses, or a firewall dropping packets. A TLS failure can't show whether DNS sent the name to a block page instead of Cloudflare (Longshot#738's "Cannot determine the frame size" is exactly that kind of answer). This puts the addresses in the log.
What changes
For each new connection, the launcher log now gets:
connected, the socket error (ConnectionRefused,NetworkUnreachable,TimedOut…), orno answer, stoppedwhen the request gave up.A pooled connection that is used again isn't logged again.
On a PC with broken IPv6, this would read
connect git-cdn.magicbean.dev [2606:4700:…]:443: no answer, stopped after …. On a DNS-filtered network, theDNSline shows an address that isn't Cloudflare's. The forge's addresses are 104.21.55.71, 172.67.170.160, 2606:4700:3032::6815:3747 and 2606:4700:3037::ac43:aaa0.How
HttpFetcheruses aSocketsHttpHandler(whatHttpClientHandlerwraps) withConnections.ConnectAsyncas itsConnectCallback.It connects the way .NET's own connect does:
Socket.OSSupportsIPv6(soDOTNET_SYSTEM_NET_DISABLEIPV6=1still works);SocketException, the last address'sSocketException, or the timeout's cancellation).So
NetFailuregives the same words as before: I checked refused, DNS, not-TLS and timeout throughHttpFetcher.The proxy is unchanged: the system's or
HTTPS_PROXY. Through a proxy, the lines name the proxy's address.This is logging only: no change to which addresses are tried, in what order, or for how long. Racing IPv4 against a slow IPv6 (Happy Eyeballs) would be a separate pull request.
One ordering quirk: .NET keeps a connect going after the request that asked for it has timed out. So a connect's
no answer, stoppedline can come a few seconds after its request'stimed outline. I measured ~5 s on Windows. That's in the doc comment.Tested (Windows 11, .NET SDK 10.0.404)
python -I tests/test_launcher_core.py: 1194 checks pass. The newConnectionChecks.cscovers:SocketException; IPv6 left out when it isn't usable; a failed lookup is logged and still throws;HttpFetcher:.invalidstill reads "could not look up … address"; a plain-HTTP server on 127.0.0.1 logsconnected, then still fails as a secure-connection failure; refused port 1 logsConnectionRefused.dotnet build App -c Release -p:RestoreLockedMode=true -warnaserror: 0 warnings.dotnet format --verify-no-changeson the changed files: clean.mise run ci:smoke(no mise here); Linux.🤖 Generated with Claude Code