newznab and the elusive -INF

Some people running newznab can run into an issue if the connection to the news provider is lost during backfill, and the only thing which happen is that it will spit out:

Getting next article date... -INF
Error : Failed to write to socket! (connection lost!)


The only "standard" way to fix this is to stop the process and start again. This should not be necessary as the only thing the code needs to check for is "-INF", and then just stop processing that group.

Adding the following to /www/lib/backfill.php at line 259

$pos=stripos($upperbound,"INF");
if(($pos !== false)) {
echo "Something went horrible wrong!!....n";
return "";
}


just after

if($debug) echo "Getting next article date... $upperboundn";

Will break the loop and make it process the next group.

Comments

Matt Wheatley said…
Great idea for the fix, could you give code around the fix as my backfill.php is looking different to yours as line 259 is an echo and 260 is a return.

Thanks
casper said…
It looked like they fixed it in a later version, I did not have to add this to the latest updates ....
jtechs said…
nice one. thanks.

Popular posts from this blog

Kviknet and IPv6

Apple IOS cannot download song

Apple AirPort Express and Digital Jitter..