From be456c9d64b58a0745236ac0e6ceaa5bbf67e2d7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 20 Mar 2020 17:22:38 +0100 Subject: [PATCH] Remove unused Err attribute on database subscription --- api/database.go | 4 ++-- database/subscription.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/database.go b/api/database.go index 8f2c4e0..8a365c9 100644 --- a/api/database.go +++ b/api/database.go @@ -384,9 +384,9 @@ func (api *DatabaseAPI) processSub(opID []byte, sub *database.Subscription) { default: api.send(opID, dbMsgTypeUpd, r.Key(), data) } - } else if sub.Err != nil { + } else { // sub feed ended - api.send(opID, dbMsgTypeError, sub.Err.Error(), nil) + api.send(opID, dbMsgTypeDone, "", nil) } } } diff --git a/database/subscription.go b/database/subscription.go index 6d29b7e..ffe516a 100644 --- a/database/subscription.go +++ b/database/subscription.go @@ -13,7 +13,6 @@ type Subscription struct { canceled bool Feed chan record.Record - Err error } // Cancel cancels the subscription.