We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d77e36 commit 2575c75Copy full SHA for 2575c75
types.go
@@ -943,6 +943,9 @@ type RegisterResponse struct {
943
}
944
945
func (r RegisterResponse) Unregister() error {
946
+ if r.registration == nil {
947
+ return fmt.Errorf("empty registration")
948
+ }
949
return r.registration.unregister()
950
951
@@ -952,6 +955,9 @@ type SubscribeResponse struct {
952
955
953
956
954
957
func (r SubscribeResponse) Unsubscribe() error {
958
+ if r.subscription == nil {
959
+ return fmt.Errorf("empty subscription")
960
961
return r.subscription.unsubscribe()
962
963
0 commit comments