Introduces 'is_connected' client call. Fixes #521#971
Open
OptrixAU wants to merge 1 commit intoFreeOpcUa:masterfrom
Open
Introduces 'is_connected' client call. Fixes #521#971OptrixAU wants to merge 1 commit intoFreeOpcUa:masterfrom
OptrixAU wants to merge 1 commit intoFreeOpcUa:masterfrom
Conversation
Member
|
checking that the thread is alive does not tell us of communication is OK or not. The only real way we have to know if we are connected is to try to read a node. In fact reading the server state node is the best as the server mught be on but in a bad state. This is done in KeepAlive class. |
Member
|
Did open other PR? Icannot see them now |
Author
|
I'd say it will be sent tomorrow.
Sent from my Samsung Galaxy smartphone.
…-------- Original message --------
From: oroulet <notifications@github.com>
Date: 1/3/20 12:16 am (GMT+10:00)
To: FreeOpcUa/python-opcua <python-opcua@noreply.github.com>
Cc: Steven Harding <sharding@optrix.com.au>, Author <author@noreply.github.com>
Subject: Re: [FreeOpcUa/python-opcua] Introduces 'is_connected' client call. Fixes #521 (#971)
Did open other PR? Icannot see them now
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#971?email_source=notifications&email_token=ACQQOABDMYGBHVKTOUMSGODRFEFCJA5CNFSM4K3TOMK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENLZ3PI#issuecomment-592944573>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACQQOABKUKA4ML7QD3OWRCDRFEFCJANCNFSM4K3TOMKQ>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In applications involving subscribing to data and waiting for data to stream in, there's no clear way to check if the client has been disconnected (for example, by shutting down the OPC-UA server).
This function isn't intended to check if a connection was initially successful (although theoretically it would do that too) - the intention is to check to see if the connection has been dropped.
Usage Pattern:
In my application, after 10 seconds with no new incoming data from the subscription, I check to see if the connection is alive. If it's still alive, it's just a lull in data, but if it's dead, we need to disconnect, reconnect and resubscribe to keep up-to-date with new data.