From 56edf9574214c102843987d24da599b05db8475d Mon Sep 17 00:00:00 2001 From: Morten Tryfoss Date: Fri, 3 Jul 2020 08:59:34 +0200 Subject: [PATCH] Changed to fit new structure of ari module --- client/bus/bus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/bus/bus.go b/client/bus/bus.go index 4239ba7..a658fc5 100644 --- a/client/bus/bus.go +++ b/client/bus/bus.go @@ -99,7 +99,7 @@ func (b *subBus) Close() { } // Used as callback from stdbus -func (b *subBus) Cancel(s ari.Subscription) { +func (b *subBus) Cancel(s interface{}) { b.mu.Lock() for i, si := range b.subs { if s == si { @@ -118,7 +118,7 @@ func (b *subBus) Send(e ari.Event) { func (b *subBus) Subscribe(key *ari.Key, eTypes ...string) ari.Subscription { sub := b.bus.Subscribe(key, eTypes...) - sub.SetCallback(b.Cancel) + sub.AddCancelCallback(b.Cancel) b.mu.Lock() b.subs = append(b.subs, sub) b.mu.Unlock()