moved empty page retry mechanism to ParserUtils

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@83 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-08-15 18:25:06 +00:00
parent f74f4419b7
commit 6648d8fa30
2 changed files with 14 additions and 19 deletions

View file

@ -85,7 +85,16 @@ public final class ParserUtils
}
pageReader.close();
return buffer;
if (buffer.length() > 0)
return buffer;
else
{
if (tries-- > 0)
System.out.println("got empty page, retrying...");
else
throw new IOException("got empty page: " + url);
}
}
catch (final SocketTimeoutException x)
{