mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-11-13 04:56:55 +03:00
Merge branch 'master' of github.com:jedisct1/dnscrypt-proxy
* 'master' of github.com:jedisct1/dnscrypt-proxy: Fallback to cache_file avoiding termination for not offline_mode (#1332) Minor update to GH Actions workflow (#1341)
This commit is contained in:
commit
8ddd5fe36e
18
.github/workflows/releases.yml
vendored
18
.github/workflows/releases.yml
vendored
@ -1,4 +1,20 @@
|
||||
on: push
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "**.go"
|
||||
- "go.*"
|
||||
- "**/testdata/**"
|
||||
- ".ci/**"
|
||||
- ".git*"
|
||||
- ".github/workflows/releases.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.go"
|
||||
- "go.*"
|
||||
- "**/testdata/**"
|
||||
- ".ci/**"
|
||||
- ".git*"
|
||||
- ".github/workflows/releases.yml"
|
||||
|
||||
name: CI and optionally publish
|
||||
|
||||
|
@ -712,8 +712,11 @@ func (config *Config) loadSource(proxy *Proxy, requiredProps stamps.ServerInform
|
||||
}
|
||||
source, err := NewSource(cfgSourceName, proxy.xTransport, cfgSource.URLs, cfgSource.MinisignKeyStr, cfgSource.CacheFile, cfgSource.FormatStr, time.Duration(cfgSource.RefreshDelay)*time.Hour)
|
||||
if err != nil {
|
||||
dlog.Criticalf("Unable to retrieve source [%s]: [%s]", cfgSourceName, err)
|
||||
return err
|
||||
if len(source.in) <= 0 {
|
||||
dlog.Criticalf("Unable to retrieve source [%s]: [%s]", cfgSourceName, err)
|
||||
return err
|
||||
}
|
||||
dlog.Infof("Downloading [%s] failed: %v, use cache file to startup", source.name, err)
|
||||
}
|
||||
proxy.sources = append(proxy.sources, source)
|
||||
registeredServers, err := source.Parse(cfgSource.Prefix)
|
||||
|
@ -211,7 +211,7 @@ func PrefetchSources(xTransport *XTransport, sources []*Source) time.Duration {
|
||||
}
|
||||
dlog.Debugf("Prefetching [%s]", source.name)
|
||||
if delay, err := source.fetchWithCache(xTransport, now); err != nil {
|
||||
dlog.Infof("Prefetching [%s] failed: %v", source.name, err)
|
||||
dlog.Infof("Prefetching [%s] failed: %v, retry after %v", source.name, err, interval)
|
||||
} else {
|
||||
dlog.Debugf("Prefetching [%s] succeeded, next update: %v", source.name, delay)
|
||||
if delay >= MinimumPrefetchInterval && (interval == MinimumPrefetchInterval || interval > delay) {
|
||||
|
Loading…
Reference in New Issue
Block a user