Skip to content

Commit

Permalink
update method docs
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed May 25, 2023
1 parent 5a15559 commit 611b2d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ func (c *Client) setPublishTimeout(d time.Duration) {
}

// SecureChannel returns the active secure channel.
// During reconnect this value can change.
// Make sure to capture the value in a method before using it.
func (c *Client) SecureChannel() *uasc.SecureChannel {
return c.atomicSechan.Load().(*uasc.SecureChannel)
}
Expand All @@ -670,6 +672,8 @@ func (c *Client) setSecureChannel(sc *uasc.SecureChannel) {
}

// Session returns the active session.
// During reconnect this value can change.
// Make sure to capture the value in a method before using it.
func (c *Client) Session() *Session {
return c.atomicSession.Load().(*Session)
}
Expand Down

0 comments on commit 611b2d7

Please sign in to comment.