Investigate Session.Close #41

Open
opened 2023-05-05 16:14:45 +00:00 by nemith · 0 comments
nemith commented 2023-05-05 16:14:45 +00:00 (Migrated from github.com)

I am pretty sure session.Close as implemented is a bit wrong. We are properly using <close-session> rpc message to gracefully close the session with the netconf server, however then we are closing the transports as well.

This should probably be modified to

  1. Send close-session
  2. Wait for timeout set by the context (and maybe a default if not set?)
  3. Wait for the session to close (on ssh this causes the channel to be closed, need to test if some vendors kill the entire connection)
  4. Never close the transport.

Transport is constructed outside of the session and passed in, it is a bit crazy that we automatically close it when the session is done as well. This is also needed to allow for transport reuse potentially.

I am pretty sure `session.Close` as implemented is a bit wrong. We are properly using `<close-session>` rpc message to gracefully close the session with the netconf server, however then we are closing the transports as well. This should probably be modified to 1. Send `close-session` 2. Wait for timeout set by the context (and maybe a default if not set?) 3. Wait for the session to close (on ssh this causes the channel to be closed, need to test if some vendors kill the entire connection) 4. Never close the transport. Transport is constructed outside of the session and passed in, it is a bit crazy that we automatically close it when the session is done as well. This is also needed to allow for transport reuse potentially.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nemith/netconf#41
No description provided.