9
0
mirror of https://github.com/Lomanic/presence-button-web synced 2024-11-14 17:57:29 +00:00

Don't panic at runtime in case of temporary network hiccups

This commit is contained in:
Lomanic 2020-11-07 19:41:35 +01:00
parent d3d1b1676c
commit ef10e0fcb4

View File

@ -244,7 +244,7 @@ func syncMatrix() {
go func() { // set online status every 15 seconds
for {
if err := matrix.SetStatus("online", "up and running"); err != nil {
panic(fmt.Sprintf("error setting matrix status: %s", err))
fmt.Println("error setting matrix status:", err)
}
time.Sleep(15 * time.Second)
}
@ -252,7 +252,7 @@ func syncMatrix() {
for {
if err := matrix.Sync(); err != nil {
fmt.Println("Sync() returned ", err)
fmt.Println("error syncing with matrix:", err)
}
}
}