mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +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 java.io.IOException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class SoftIfModifiedSinceProber {
|
||||
@ -44,6 +45,9 @@ public class SoftIfModifiedSinceProber {
|
||||
var contentTypeHeader = rsp.header("Last-Modified");
|
||||
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