HowTo handle "faulted" connection attempt
See original GitHub issueActually I want to implement an auto reconnect on faulted
connection attempts.
After the connection failed, the actual State = CommunicationState.Faulted
.
In OpenAsync()
(https://github.com/convertersystems/opc-ua-client/blob/master/UaClient/ServiceModel/Ua/Channels/CommunicationObject.cs#L187) there is a check if the State == CommunicationState.Faulted
(https://github.com/convertersystems/opc-ua-client/blob/master/UaClient/ServiceModel/Ua/Channels/CommunicationObject.cs#L473). This results into an InvalidOperationException("Channel not modifiable.")
.
How should I resolve the problem?
CloseAsync()
is not possible to be called -> Exception(Channel faulted)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
"A connection attempt failed because the connected party ...
Resolving the “TCP error code 10060: A connection attempt failed…” while consuming a web service ... catch (Exception ex) { throw; } }....
Read more >Failed Connection Attempt - Firewall Control
Failed Connection Attempt - Firewall Control. Can anyone explain why I am seeing this "Top Threat" from IP's in my own network?
Read more >Can't handle a failed connection attempt
Hi, I'm trying to do stuff when a client tries to connect but the server is not running. ... Can't handle a failed...
Read more >Failed Connection Attempt on DNS queries : r/fortinet
This morning there are thousands of these Failed Connection Requests for this host and IP despite only a few (<0%) of the pings...
Read more >How to find source of TCP failed connection attempts?
1 Answer 1 ... Consider contacting your hosting company/Network Admins and asking them about these failed connections. To avoid finger-pointing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Back when I started this project, I tried to follow Microsoft’s WCF guidelines. When you used a WCF client, and there was an exception, you would catch the exception and Abort (vs Close) the Client. Abort disposes the channel without communicating to the server ( which probably has closed it’s session anyway)
@awcullen Hi Andrew. Why would AbortAsync be needed if the channel faulted? Shouldn’t it already be closed?