Skip to content

Commit

Permalink
channel only needs to be able to read
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer committed Jan 19, 2022
1 parent 1743aa2 commit 8a06ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// Subscribe creates a Subscription with given parameters.
// Parameters that have not been set are set to their default values.
// See opcua.DefaultSubscription* constants
func (c *Client) Subscribe(params *SubscriptionParameters, notifyCh chan *PublishNotificationData) (*Subscription, error) {
func (c *Client) Subscribe(params *SubscriptionParameters, notifyCh chan<- *PublishNotificationData) (*Subscription, error) {
stats.Client().Add("Subscribe", 1)

if params == nil {
Expand Down
2 changes: 1 addition & 1 deletion subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Subscription struct {
RevisedPublishingInterval time.Duration
RevisedLifetimeCount uint32
RevisedMaxKeepAliveCount uint32
Notifs chan *PublishNotificationData
Notifs chan<- *PublishNotificationData
params *SubscriptionParameters
items map[uint32]*monitoredItem
itemsMu sync.Mutex
Expand Down

0 comments on commit 8a06ec5

Please sign in to comment.