summaryrefslogtreecommitdiffstats
path: root/updates.go
diff options
context:
space:
mode:
Diffstat (limited to 'updates.go')
-rw-r--r--updates.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/updates.go b/updates.go
index 33f12a9..28480c4 100644
--- a/updates.go
+++ b/updates.go
@@ -38,7 +38,13 @@ func addUpdate(pid int, action uint, song *Song) {
tailUpdates[pid] = update
}
-func getUpdates(pid int, timestamp int64) *Update {
+func getUpdates(id string, timestamp int64) *Update {
+ db := <-dbPool
+ pid := getpid(db, id)
+ dbPool <- db
+ if pid == -1 {
+ return nil
+ }
pup, ok := headUpdates[pid]
if !ok {
return nil