Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-02-16 19:37:10 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-02-16 19:37:10 +0300
commit9747e5820ce129895e95355b254d110cb39496a4 (patch)
tree15de284bad0b0344738dcfe7fe57596825e2b661 /domains.go
parenta9b41da7fc5a07eae0a72dc7e59f323a73e74a54 (diff)
Fix small bugs
Diffstat (limited to 'domains.go')
-rw-r--r--domains.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/domains.go b/domains.go
index 6b4849fb..de038f5e 100644
--- a/domains.go
+++ b/domains.go
@@ -125,12 +125,15 @@ func watchDomains(rootDomain string, updater domainsUpdater, interval time.Durat
lastUpdate := []byte("no-update")
for {
+ // Read the update file
update, err := ioutil.ReadFile(".update")
+ if err != nil && !os.IsNotExist(err) {
+ log.Println("Failed to read update timestamp:", err)
+ }
+
+ // If it's the same ignore
if bytes.Equal(lastUpdate, update) {
- if err != nil {
- log.Println("Failed to read update timestamp:", err)
- time.Sleep(interval)
- }
+ time.Sleep(interval)
continue
}
lastUpdate = update