[leafnode-list] Re: Strange problem with 2.0.0.alpha20050412a
Matthias Andree
matthias.andree at gmx.de
Mon May 9 12:02:20 CEST 2005
On Mon, 09 May 2005, John Carlyle-Clarke wrote:
> I can quite understand that Leafnode cannot work around a broken
> server - in the sense of manage to retrieve news from it - but is it
> expected that the fetch would hang, and that it would fail to retrieve
> news from any servers, which was what seemed to be happening?
Well, it should ultimately give up on that server. Fetchnews indeed isn't
very good at re-synchronizing when presented with article data rather
than NNTP protocol data.
One of the reasons is that leafnode sends a batch of ARTICLE commands in
advance (will be called PIPELINING in a future RFC version, is
mandatory, and works well as long as the servers don't goof up on the
"." end-of-multiline-response marker) and assumes it has seen the end of
the article when in fact it hasn't because the upstream server sent junk
after the end of the article that fetchnews mistook for NNTP command
responses.
The alternatives I have are (1) easy: drop connection to the server as
soon as it sends a non-numeric response to a command and mark the
article fetched, so that fetchnews can catch up at the next run,
(2) complicated: keep reading in spite of the period until we see a
period followed by a line with numeric response. This is a complicated
matter since we must make sure that we're getting that additional line,
for instance, by stuffing a STAT command. (3) half-baked: try to peek at
the read buffer with a non-blocking read to see if there was data after
the period.
Options 2 and 3 require a major rewrite of leafnode components.
I'll see if Option #1 is as easy to implement as I believe later today.
HTH.
Regards,
--
Matthias Andree
More information about the leafnode-list
mailing list