Juniper / go-netconf

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

Added error to write #104

Closed Tobbeman closed 3 years ago

Tobbeman commented 3 years ago

This error can be used to detect if the connection was broken, for example if the server goes down between client sending data.

psuedo code: reply, err := s.exec() if err != nil { if err.Error() == netconf.BrokenConnectionError { retry() } }

In my current use case I need to know if the server goes down, since the client will be living a long time, connection between server and client can at some point go down. This fix will let me detect that.

Tobbeman commented 3 years ago

@nemith Can you take another look?

nemith commented 3 years ago

Thanks for fixing this and sorry for the long review time. I guess no one else is really maintaining this package.