[core] Do not consider error'ed responses fresh

It has the unwanted side effect of not retrying anymore in case
of error.
This commit is contained in:
Thiago Marcos P. Santos
2017-02-06 16:04:04 +01:00
committed by Thiago Marcos P. Santos
parent 2c7350c093
commit e6659242bc

View File

@@ -35,7 +35,7 @@ public:
optional<std::string> etag;
bool isFresh() const {
return !expires || *expires > util::now();
return expires ? *expires > util::now() : !error;
}
};