mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 13:19:02 +00:00
(crawler) Reduce log noise from timeouts in SoftIfModifiedSinceProber
This commit is contained in:
parent
32fe864a33
commit
91a98a8807
@ -6,6 +6,7 @@ import okhttp3.OkHttpClient;
|
|||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class SoftIfModifiedSinceProber {
|
public class SoftIfModifiedSinceProber {
|
||||||
@ -44,6 +45,9 @@ public class SoftIfModifiedSinceProber {
|
|||||||
var contentTypeHeader = rsp.header("Last-Modified");
|
var contentTypeHeader = rsp.header("Last-Modified");
|
||||||
return Objects.equals(contentTypeHeader, tags.lastMod());
|
return Objects.equals(contentTypeHeader, tags.lastMod());
|
||||||
}
|
}
|
||||||
|
catch (SocketTimeoutException e) { // suppress timeout exceptions to reduce log noise
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user