Skip to content

Commit

Permalink
Fix possible panic
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Jan 28, 2024
1 parent 2ff85b4 commit 2b9424b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spine/feature_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (r *FeatureLocal) SubscribeToRemote(remoteAddress *model.FeatureAddressType
}

if r.Role() == model.RoleTypeServer {
return nil, model.NewErrorTypeFromString(fmt.Sprintf("the server feature '%s' cannot request a subscription", r))
return nil, model.NewErrorTypeFromString(fmt.Sprintf("the server feature '%s' cannot request a subscription", r.Feature.String()))
}

msgCounter, err := remoteDevice.Sender().Subscribe(r.Address(), remoteAddress, r.ftype)
Expand Down Expand Up @@ -240,7 +240,7 @@ func (r *FeatureLocal) BindToRemote(remoteAddress *model.FeatureAddressType) (*m
}

if r.Role() == model.RoleTypeServer {
return nil, model.NewErrorTypeFromString(fmt.Sprintf("the server feature '%s' cannot request a binding", r))
return nil, model.NewErrorTypeFromString(fmt.Sprintf("the server feature '%s' cannot request a binding", r.Feature.String()))
}

msgCounter, err := remoteDevice.Sender().Bind(r.Address(), remoteAddress, r.ftype)
Expand Down

0 comments on commit 2b9424b

Please sign in to comment.