diff --git a/contrib/extension/subscription/subscription.go b/contrib/extension/subscription/subscription.go index acaef9c66881e1489d65ba8c106da2dd20a25e2e..4f857d96a0885fb660e9cf899f71382e55907ca6 100644 --- a/contrib/extension/subscription/subscription.go +++ b/contrib/extension/subscription/subscription.go @@ -90,6 +90,8 @@ type Notifier struct { id SubID err chan error + + sentId bool } func (n *Notifier) ID() SubID { @@ -117,7 +119,10 @@ func (n *Notifier) send(data json.RawMessage) error { // try to send the id back. this will just fail with errAlreadySent if its already been sent. // so it is safe-ish to just ignore this error // technically we should check for jsonrpc.ErrSendAlreadyCalled and then error earlier otherwise... but is that really right? - _ = n.h.Send(n.id, nil) + if n.sentId == false { + _ = n.h.Send(n.id, nil) + n.sentId = true + } err := n.h.Notify( n.namespace+