diff --git a/Makefile b/Makefile index 6cf4daa..01437d7 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ fmt: go fmt ./... .PHONY: fmt + +lint: + golangci-lint run -E goimports -E godot --timeout 10m +.PHONY: lint diff --git a/multicast.go b/multicast.go index d9d700c..5499d54 100644 --- a/multicast.go +++ b/multicast.go @@ -78,7 +78,10 @@ func (b *PubSubMulticast) Pub(msg *Msg) error { } for _, sub := range matches { sub.Chan <- err - b.UnSub(sub) + err = b.UnSub(sub) + if err != nil { + log.Error("unsub err", "err", err) + } } return err