Skip to content

Commit 71cb215

Browse files
authored
fix(profile): prevent HTTP header from overriding custom update intervals (#757)
1 parent c05032b commit 71cb215

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

service/src/main/java/com/github/kr328/clash/service/ProfileProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ object ProfileProcessor {
106106
}
107107

108108
val updateIntervalHeader = response.headers["profile-update-interval"]
109-
if (response.isSuccessful && updateIntervalHeader != null) {
109+
if (old == null && snapshot.interval == 0L && response.isSuccessful && updateIntervalHeader != null) {
110110
val intervalHours = updateIntervalHeader.toLongOrNull()
111111
if (intervalHours != null) {
112112
updateInterval = if (intervalHours > 0) {

0 commit comments

Comments
 (0)