Re: Patch
Urs Janßen <[email protected]>
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Oct 14, 2006 at 09:22:28PM +0200, Dirk Nimmich wrote: > > In <[email protected]>, Dirk Nimmich wrote: > > > + BUG. resent command on 503 error > > > > this is needed to avoid possible article loss after a connection > > timeout with e.g. inn-2.2.3 "503 Timeout after 600 seconds, closing > > connection." (after the timeout the first articles is > > marked read but not displayed as tin thinks it unavailable), reverting > > this change should fix this: > > Sorry, but IMO this is the wrong way to fix this. The "article loss" > must be handled outside of the get response function, and not only > for any 503 error code (which is a bug in INN 2.2.3, not in tin) but what would be the correct response code on a timeout? 205? 400? 502? no responsecode at all? (i've seen 503, 400 and no response code at all). > for any unexpected response code/connection loss (the server may > have closed the connection or it may be lost due to other > circumstances). 503 is a generic error code also used for unknown > (sub) commands like after AUTHINFO GENERIC ANY; you normally don't > want to send the wrong command again because this may cause a loop > or an unexpected state on the server side (AUTHINFO again). > > The more I look into the NNTP handling code (mostly the response > code handling and reconnecting) the more I see a need for a complete > rewrite (see also my other mail). rewriting the code might be the correct solution, but till somebody addresses this resinding the last command on 503 is IMHO better than article loss after a timeout. to avoid loops this might be restricted to: if (((respcode == ERR_FAULT && !strncmp(last_put, "ARTICLE", 7)) || respcode == ERR_GOODBYE || respcode == OK_GOODBYE) && last_put[0] != '\0' && strcmp(last_put, "QUIT")) { urs -- "Only whimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" - Linus