diff --git a/api/database.go b/api/database.go index 48b9e35..862feb4 100644 --- a/api/database.go +++ b/api/database.go @@ -329,9 +329,10 @@ func (api *DatabaseAPI) processSub(opID []byte, sub *database.Subscription) { r.Unlock() if err != nil { api.send(opID, dbMsgTypeWarning, err.Error(), nil) + continue } // TODO: use upd, new and delete msgTypes - if r.Meta().Deleted > 0 { + if r.Meta().IsDeleted() { api.send(opID, dbMsgTypeDel, r.Key(), nil) } else { api.send(opID, dbMsgTypeUpd, r.Key(), data)