Resolve IRC client hostnames off the accept loop (closes #156) #172

Merged
clawbot merged 1 commits from issue-156-resolve-off-accept into next 2026-10-21 03:31:28 +02:00
1 Commits
Author SHA1 Message Date
sneak c28a8817a4 Resolve IRC client hostnames off the accept loop (closes #156)
check / check (push) Canceled after 0s
acceptLoop called newConn, which did the reverse DNS lookup, with its
three-second timeout, before the loop could accept the next
connection, so one client whose address had no answering reverse DNS
held up every other IRC connect. serve now does the lookup at its
start, on the connection's own goroutine, and the accept loop only
accepts.

The server keeps the lookup function in a field, as it does the ping
times, so that a test can give it one that blocks. The new test
checks that a second client registers while the first one's lookup
has not returned.

Model: opus-5-5
2026-10-21 01:02:40 +00:00