summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-05-01 14:32:46 +0200
committerKevin Chabowski <kevin@kch42.de>2014-05-01 14:33:15 +0200
commitc071a0b5dddbea30ed2a6222ef9d31ae6716542d (patch)
tree0b42393863261a54c64f5a8cec951f9bf5d3544d
parent8417e8d7bbf37ac0ac25fc4915131e93ea2bcdcc (diff)
downloadstartpage-c071a0b5dddbea30ed2a6222ef9d31ae6716542d.tar.gz
startpage-c071a0b5dddbea30ed2a6222ef9d31ae6716542d.tar.bz2
startpage-c071a0b5dddbea30ed2a6222ef9d31ae6716542d.zip
Fixed updaters.
If, for some reasons, startpage could not gather new data before, nil data would have been stored, leaving the startpage mostly blank and useless.
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index d6d52b1..27a5ab6 100644
--- a/main.go
+++ b/main.go
@@ -27,8 +27,9 @@ func earthPornUpdater(ch chan bool) {
for _ = range ch {
newporn, err := GetEarthPorn()
if err != nil {
- log.Printf("Failed getting fap material: %s", err)
+ log.Print(err)
go trylater(ch)
+ continue
}
porn = newporn
@@ -42,6 +43,7 @@ func weatherUpdater(ch chan bool) {
if err != nil {
log.Printf("Failed getting latest weather data: %s", err)
go trylater(ch)
+ continue
}
weather = newW