When the session is closed, the "close-session" netconf message is sent.
If any netconf errors occurs during the close, they are not propagated to the user.
In session.go (Close) we have:
// This may fail so save the error but still close the underlying transport.
req := NewRPC(&closeSession{})
resp, _ := s.Do(ctx, req)
if resp != nil {
_ = resp.Close()
}
The comment indicates that errors from this operation are saved, but there are no traces of this in the code.
The resp variable is not used anywhere else in the code.
If this code is replaced by;
// This may fail so save the error but still close the underlying transport.
closeErr = s.Exec(ctx, &closeSession{}, nil)
I suppose by doing this, the errors should be extracted from the response and saved in closeErr ?
When the session is closed, the "close-session" netconf message is sent.
If any netconf errors occurs during the close, they are not propagated to the user.
In session.go (Close) we have:
The comment indicates that errors from this operation are saved, but there are no traces of this in the code.
The resp variable is not used anywhere else in the code.
If this code is replaced by;
I suppose by doing this, the errors should be extracted from the response and saved in closeErr ?