Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssh/connection.go: fix and enhance trace logs
We added trace logging to several functions and methods related to the creation and shutdown of SSH connections in commit 326b1ee of PR git-lfs#5063, which help when debugging any problems with our implementation of the SSH-based object transfer protocol. However, in the startConnection() function in our ssh/connection.go source file, we report the successful creation of a connection even if we are returning a non-nil error value. Therefore we revise our trace logging there to distinguish unsuccessful and successful conditions, based on whether the PktlineConnection structure's Start() method returned an error or not. As well, we update a number of our other trace log message to include the connection ID. Because we maintain a set of SSH connections and do not necessarily start or shut down all of them at the same time, this change provides further clarity as to the state of each individual connection at different points in a trace log.
- Loading branch information