Juniper / go-netconf

NETCONF implementation in Go.
Other
253 stars 110 forks source link

Handle EOF but no message marker to mark end of message #118

Open inspiregates opened 1 year ago

nemith commented 1 year ago

whats the scenario that triggers this?

inspiregates commented 1 year ago

whats the scenario that triggers this?

When the SSH connection is terminated by the remote device, sometimes there is an EOF received and sometimes not. When it is not EOF, this is triggered.

In my case, the code starts with listening on an incoming TCP connection (originated by a remote device) on a given port and uses that TCP connection to establish a netconf.DialSSHTimeout() session. When the remote device closes the TCP connection on its own, the netconf session receives either an EOF sometimes (that is handled) or results in an error saying "WaitForFunc Failed", which this fix aids.

inspiregates commented 1 year ago

Does this need anymore justification?