-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add SetReadDeadline for Conn #649
Comments
Seems reasonable. Can you make a PR? |
Though this would need to be deconflicted with the calls to |
@kung-foo what would a cleaner solution look like? We can break the API with v0.5 if it makes sense since we're going to anyway. |
Also, would all calls require the same |
Yeah, was thinking later about some of the other pub/sub style calls. I'll need to read more into how keep-alives are implemented (i.e. TCP vs OPC-UA keep alive message). Just a few weeks ago we ran into an issue where Aveva would do SYN,SYNACK,ACK and then nothing. Using #629 "fixed" it. |
At minimum, every call that takes a context should apply a deadline (if the context has one). |
I found this PR #628 will fix this issue |
@Kolyan4ik99 can you test what the read deadline does with |
I'm a bit reluctant to merge #628 without knowing that. |
If code I am using this change in a project and it creates some new problems. My OPC server updates parameters by subscription once every 2 minutes, and I set readTimeout = time.Now().Add(time.Minute):
I need to know the interval of the most frequently updated parameter or use a re-subcribiction There were no other problems |
The The secure channel It is valid for the OPC server to not send data. I can just open a secure channel and not do anything with it. Or monitor a value that never changes. So setting a |
context deadlines are specific to a request and shouldn't necessarily close the connection or am I off-base here? |
Context terms don't close the connection, it's local logic Yes, |
Hi!
opcua/uacp/conn.go
Line 358 in 6fd3deb
opcua/uacp/conn.go
Line 373 in 6fd3deb
This code snippet blocks a running program while network is down. I suggest adding something like this before io.ReadFull()
This will solve the following problems:
How do I reproduce my problems?
Example how I create opcua.Client:
The text was updated successfully, but these errors were encountered: