diff --git a/plugins/inputs/opcua/opcua_client.go b/plugins/inputs/opcua/opcua_client.go index 8a5d8a58bc97b..53454ba8816a7 100644 --- a/plugins/inputs/opcua/opcua_client.go +++ b/plugins/inputs/opcua/opcua_client.go @@ -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")