[status] Avoid an error for empty modified client ID
This is harmless, but it logs an error which causes a small and
unnecessary error-rate spike.
Bug: skia:
Change-Id: I36fb66028629c22a8fa101ed2f04d3a9f8678fc3
Reviewed-on: https://skia-review.googlesource.com/c/179737
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
diff --git a/status/go/incremental/tasks.go b/status/go/incremental/tasks.go
index 3bdd34b..c4d8857 100644
--- a/status/go/incremental/tasks.go
+++ b/status/go/incremental/tasks.go
@@ -51,8 +51,10 @@
// just "return c.Reset(...)". Assumes the caller holds a lock.
func (c *taskCache) Reset(w *window.Window) (map[string][]*Task, bool, error) {
sklog.Infof("Resetting DB connection.")
- c.db.StopTrackingModifiedTasks(c.queryId)
- c.queryId = ""
+ if c.queryId != "" {
+ c.db.StopTrackingModifiedTasks(c.queryId)
+ c.queryId = ""
+ }
queryId, err := c.db.StartTrackingModifiedTasks()
if err != nil {
return nil, false, err