Skip to content

Commit

Permalink
Merge pull request #596 from hotafrika/fix/close-secure-channel-in-close
Browse files Browse the repository at this point in the history
set SecureChannel nil in Close() method
  • Loading branch information
magiconair authored Mar 22, 2023
2 parents b41bfaa + a60e59e commit 020a945
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ func (c *Client) CloseWithContext(ctx context.Context) error {
}
if c.SecureChannel() != nil {
c.SecureChannel().Close()
c.setSecureChannel(nil)
}

// https://github.com/gopcua/opcua/pull/462
Expand Down
2 changes: 1 addition & 1 deletion uatest/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestStats(t *testing.T) {
"Send": newExpVarInt(2),
"Close": newExpVarInt(1),
"CloseSession": newExpVarInt(2),
"SecureChannel": newExpVarInt(2),
"SecureChannel": newExpVarInt(3),
"Session": newExpVarInt(4),
"State": newExpVarInt(0),
}
Expand Down

0 comments on commit 020a945

Please sign in to comment.