GNU bug report logs -
#40748
28.0.50; Switching wifi networks hangs dns lookups
Previous Next
Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date: Tue, 21 Apr 2020 17:12:02 UTC
Severity: normal
Merged with 41234
Found in versions 27.0.91, 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I'm on Emacs master, but this behavior has been evident for quite some
time, a year or two I think.
I often have trouble reconnecting Gnus' nntp servers after sleeping the
laptop in one location, and waking it up in another, connecting to a new
wifi network (I'm using Arch linux, if it matters).
I edebugged `nntp-open-connection', and realized that the error (which
is getting handled by `nnheader-report', that's why I didn't notice it)
is actually a dns error:
(error "news.gmane.io/nntp Temporary failure in name resol...")
Other Emacs network connections behave as normal. But this error for
this particular server persists until I restart Emacs.
Are DNS lookups cached? Cached per connection? Is there anything we can
do to flush whatever's "stuck"?
Here's the code that opens the connection; in my case it's
nntp-open-network-stream/network.
Happy to help with further debugging!
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(map '((nntp-open-network-stream network)
(network-only plain) ; compat
(nntp-open-plain-stream plain)
(nntp-open-ssl-stream tls)
(nntp-open-tls-stream tls))))
(if (assoc nntp-open-connection-function map)
(open-network-stream
"nntpd" pbuffer nntp-address nntp-port-number
:type (cadr (assoc nntp-open-connection-function map))
:end-of-command "^\\([2345]\\|[.]\\).*\n"
:capability-command "HELP\r\n"
:success "^3"
:starttls-function
(lambda (capabilities)
(if (not (string-match "STARTTLS" capabilities))
nil
"STARTTLS\r\n")))
(funcall nntp-open-connection-function pbuffer)))
This bug report was last modified 3 years and 151 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.