Skip to content

Commit

Permalink
fix(opcua): clean client on disconnect so that connect works cleanly (#…
Browse files Browse the repository at this point in the history
…9583)

(cherry picked from commit 7def7e7)
  • Loading branch information
milgner authored and reimda committed Aug 18, 2021
1 parent 1e856b0 commit b588fb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/opcua/opcua_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ func disconnect(o *OpcUA) error {
case "opc.tcp":
o.state = Disconnected
o.client.Close()
o.client = nil
return nil
default:
return fmt.Errorf("invalid controller")
Expand Down

0 comments on commit b588fb4

Please sign in to comment.