Log the error that happens on sconn.Wait()
It's an attempt to debug mysterious context canceled
errors that mostly happen on production
Let's use sconn.Wait()
to synchronize on exit call and also log the reason why the connection has been closed: https://github.com/golang/crypto/blob/0c34fe9e7dc2486962ef9867e3edb3503537209f/ssh/mux.go#L186
Related discussion: #559 (comment 934387869)
Supporting https://gitlab.com/groups/gitlab-org/-/epics/8014+
Edited by Sean Carroll