Lars Ingebrigtsen <[email protected]> writes: > Eric Abrahamsen <[email protected]> writes: > >> In the meantime I got a backtrace on my stop-the-world nntp connection >> error, which I've posted below. I guess there's nothing mysterious about >> it -- the process dies (I can't tell if it's actually the timeout doing >> it or not), and nntp-accept-process-output/nntp-report ends up raising >> the error, and there's nothing up the line to catch it. Does this look >> surprising or wrong for any reason? >> >> (if nntp--report-1 (progn (if nntp-record-commands (progn >> (nntp-record-command "*** CONNECTION LOST ***"))) (throw > > Network errors are common, so it shouldn't be throwing an error in the > first place. > > But I can't recall ever seeing the `nntp-report' function before, so who > knows what the logic is. :-/ That looks like a... debugging function?
The function has existed and raised an error since the "dawn of time" (since CVS days), I guess I'm surprised this hasn't annoyed anyone else. Basically it shadows `nnheader-report', and gives the server a single chance to reconnect in case of failure -- the "nntp-with-open-group" mechanism -- before failing altogether. All that's fine, I wish nnimap had something similar, but raising the error seems wrong. In fact raising the error would be the right thing in the code sketch I posted above! This code is ahead of its time. Anyway, simply removing the call to error should do the trick. That will leave `nnheader-report' as the final form, which returns nil. `nntp-report' is the final form everywhere it's called, so the nil goes up to callers, which will (mostly) interpret that as failure. Eric
