Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail on initial dial when autoreconnect is true #660

Open
wipsel opened this issue Jun 9, 2023 · 1 comment
Open

Don't fail on initial dial when autoreconnect is true #660

wipsel opened this issue Jun 9, 2023 · 1 comment

Comments

@wipsel
Copy link

wipsel commented Jun 9, 2023

When an application is started and the opc-ua server is not online at the start of the application. The client obviously cannot connect. In the current situation the Connect method fails with an error.
But in some use cases it would be useful to create the client anyway add monitored items etc and just connect whenever the server is online again.

Maybe a method could be added TryConnect(ctx context.Context) that does an initial dial and if it fails it starts the reconnect loop. Or we could update the existing Connect method to adapt this behavior when AutoReconnect is true.

Let me know if this is useful or if there is another way to achieve the behavior I am describing. If this is something useful for the project let me know and I could look into fixing this.

@Scaredon
Copy link

Scaredon commented Nov 13, 2023

@wipsel
+1
this would help a lot to make telegraf - opcua more usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants