Version: 1.0-beta6 "Bezerkus" (using KDE 3.2.3, SuSE) Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.20-4GB-athlon When a RSS feed is inaccessible (e.g. because the server is offline), it causes Akregator to get stuck trying to fetch this feed (fetch buttons greyed-out). There should be a (preferrably configurable) timeout after which Akregator will skip inaccessible feeds, mark them as "inaccessible" with a different font-style or icon, and skip to the next feed. A button for manually cancelling the fetch process would also be nice.
Oops... I just noticed there seems to be a "cancel" button, but it does not appear to work until all feeds have been fetched after startup and it does not show up when Akregator is embedded in Kontact (therefore I did not notice it at first).
Yes, you aren't the only one who have noticed that the cancel button is disabled when fetching on startup. I've also talked about setting some kind of timeout delay (or maybe changing kio_http's one somehow?) for fetching.
and why not beeing smarter and authorizing to fetch again, even if the last fetch is not done ? I mean we should set a flag on each feed saying if we already started a fetch (I guess it's already done, since the icon is gray-ed while fetching atm ...). and if the user ask for a new fetch, we only fetch feeds that have their flag off.
CVS commit by osterfeld: Add timeout of 90 sec, after which a fetch is canceled. So a non-responding site can't block the transaction forever. Note to self: Improve that when refactoring librss BUG: 90457 M +17 -0 loader.cpp 1.15 M +3 -0 loader.h 1.4 --- kdepim/akregator/src/librss/loader.cpp #1.14:1.15 @@ -20,4 +20,5 @@ #include <qregexp.h> #include <qstringlist.h> +#include <qtimer.h> using namespace RSS; @@ -73,4 +74,8 @@ void FileRetriever::retrieveData(const K d->job = KIO::get(u, true, false); + + + QTimer::singleShot(1000*90, this, SLOT(slotTimeout())); + connect(d->job, SIGNAL(data(KIO::Job *, const QByteArray &)), SLOT(slotData(KIO::Job *, const QByteArray &))); @@ -80,4 +85,16 @@ void FileRetriever::retrieveData(const K } +void FileRetriever::slotTimeout() +{ + abort(); + + delete d->buffer; + d->buffer = NULL; + + d->lastError = KIO::ERR_SERVER_TIMEOUT; + + emit dataRetrieved(QByteArray(), false); +} + int FileRetriever::errorCode() const { --- kdepim/akregator/src/librss/loader.h #1.3:1.4 @@ -130,4 +130,7 @@ namespace RSS void permanentRedirection(const KURL &url); + protected slots: + void slotTimeout(); + private slots: void slotData(KIO::Job *job, const QByteArray &data);