From: Robert Pluim <rpluim@gmail.com>
To: Tim Landscheidt <tim@tim-landscheidt.de>
Cc: 53070@debbugs.gnu.org
Subject: bug#53070: 27.2; Message "Server closed connection" not verbose enough
Date: Fri, 07 Jan 2022 10:35:14 +0100 [thread overview]
Message-ID: <87iluv7ust.fsf@gmail.com> (raw)
In-Reply-To: <87o84nhq0j.fsf@vagabond.tim-landscheidt.de> (Tim Landscheidt's message of "Fri, 07 Jan 2022 09:08:28 +0000")
>>>>> On Fri, 07 Jan 2022 09:08:28 +0000, Tim Landscheidt <tim@tim-landscheidt.de> said:
Tim> Now "Server closed connection" is an error message defined
Tim> for IMAP /and/ NNTP servers, and I have configured more than
Tim> one NNTP server as well. So I had to set
Tim> nntp-record-commands to t and look in *nntp-log*'s:
Someone hasn't applied "Robert's rules for debuggability", which
state: "All log messages must be unique" :-)
Tim> | 20220106T154438.490 news.gmane.io MODE READER
Tim> | 20220106T154508.531 news.gmane.io *** CONNECTION LOST ***
Tim> | 20220106T154511.955 news.gmane.io MODE READER
Tim> | 20220106T154541.984 news.gmane.io *** CALLED nntp-report ***
Tim> to /assume/ that the error occurs while Gnus is trying to
Tim> talk to news.gmane.io.
Untested patch below.
Tim> It would be more helpful if the error message read "Server
Tim> news.gmane.io closed connection" or, to avoid any ambiguity,
Tim> "NNTP server news.gmane.io closed connection".
Tim> (Side note: If such a hiccup happens, it sometimes appears
Tim> that the *Group* buffer is not updated with regard to number
Tim> of unread messages per group, etc. for /other/ servers that
Tim> were successfully contacted. I don't know if Gnus is more
Tim> aggressive than it needs to be here; if it encounters an er-
Tim> ror when trying to contact a POP3 server, it will just ask
Tim> nicely and continue on.)
Thatʼs a separate issue. My connections are reliable enough that I
donʼt see this.
diff --git i/lisp/gnus/nnimap.el w/lisp/gnus/nnimap.el
index fd6e3c0ccf..710b08b9da 100644
--- i/lisp/gnus/nnimap.el
+++ w/lisp/gnus/nnimap.el
@@ -245,7 +245,7 @@ nnimap-retrieve-headers
(nnimap-header-parameters))
t)
(unless (process-live-p (get-buffer-process (current-buffer)))
- (error "Server closed connection"))
+ (error "IMAP server %S closed connection" nnimap-address))
(nnimap-transform-headers)
(nnheader-remove-cr-followed-by-lf))
(insert-buffer-substring
diff --git i/lisp/gnus/nntp.el w/lisp/gnus/nntp.el
index 038a6d0625..df4c0068e3 100644
--- i/lisp/gnus/nntp.el
+++ w/lisp/gnus/nntp.el
@@ -305,7 +305,7 @@ nntp-send-string
(nntp-record-command string))
(process-send-string process (concat string nntp-end-of-line))
(or (memq (process-status process) '(open run))
- (nntp-report "Server closed connection")))
+ (nntp-report "NNTP server %S closed connection" nntp-address)))
(defun nntp-record-command (string)
"Record the command STRING."
@@ -370,7 +370,7 @@ nntp-wait-for
(nntp-snarf-error-message)
nil))
((not (memq (process-status process) '(open run)))
- (nntp-report "Server closed connection"))
+ (nntp-report "NNTP server %S closed connection" nntp-address))
(t
(goto-char (point-max))
(let ((limit (point-min))
@@ -1435,7 +1435,7 @@ nntp-accept-process-output
;; be the process's former output buffer (i.e. now killed)
(or (and process
(memq (process-status process) '(open run)))
- (nntp-report "Server closed connection")))))
+ (nntp-report "NNTP server %S closed connection" nntp-address)))))
(defun nntp-accept-response ()
"Wait for output from the process that outputs to BUFFER."
@@ -1454,7 +1454,7 @@ nntp-possibly-change-group
(when group
(let ((entry (nntp-find-connection-entry nntp-server-buffer)))
(cond ((not entry)
- (nntp-report "Server closed connection"))
+ (nntp-report "NNTP server %S closed connection" nntp-address))
((not (equal group (caddr entry)))
(with-current-buffer (process-buffer (car entry))
(erase-buffer)
Robert
--
next prev parent reply other threads:[~2022-01-07 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 9:08 bug#53070: 27.2; Message "Server closed connection" not verbose enough Tim Landscheidt
2022-01-07 9:35 ` Robert Pluim [this message]
2022-01-14 8:04 ` Lars Ingebrigtsen
2022-01-07 16:13 ` Eric Abrahamsen
2022-01-07 22:12 ` Tim Landscheidt
2022-01-07 22:41 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iluv7ust.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=53070@debbugs.gnu.org \
--cc=tim@tim-landscheidt.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).