Add Pool object for managing sessions (retries, reconnections, etc) #95
Labels
No labels
breaking-change
bug
dependencies
duplicate
enhancement
go
good first issue
help wanted
invalid
investigation
proposal
proposal-accepted
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nemith/netconf#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is not an issue, but I suggest to enhance it for rainy day case.
Problem Description:
Workaround:
I can detect it by the following code sample. But I need to detect several errors as following per my expierence(maybe not all, just what I found). If this lib can support autoconnect feature such like Rockwell AB PLC or just make returned error to be simple will be better.
I think both are needed. I've been meaning to clean up transport errors (and fail on any error from the transport).
I have been tossing around the idea of a higher order "pool" package which would handle not only reconnects when there are failures (or lazy connect) but also be able to handle multiple requests over multiple sockets up to some set value. This would be a good use case here (with maxConnection set to 1)
There is a problem with autoreconnect. NETCONF is connection oriented. There are RPC calls like
<lock>and<unlock>or<commit><confirmed/>that assume the connection itself to do the right things. Doing a reconnect between calls breaks this.I do realize there are use cases like a notification receiver. This goes back to having a manager or a pool (need to noodle on this a bit).
Now if the network fails we need to return an error and not freeze. I am in the middle of a rewrite and I will add some tests around network disconnects so that the library consumer can reconnect.