diff options
Diffstat (limited to 'updates.go')
-rw-r--r-- | updates.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |