summaryrefslogtreecommitdiff
path: root/internal/sshd/sshd.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2022-05-06 18:45:30 +0400
committerIgor Drozdov <idrozdov@gitlab.com>2022-05-06 19:00:49 +0400
commit8f1f3fa10b141de3682a378d231224cb37a68014 (patch)
tree0ccb24f6a938cf7d1c15c235c0e64a257127c8f1 /internal/sshd/sshd.go
parent199ea1d17a2497c34cb820728cdbc01fb5e700e5 (diff)
downloadgitlab-shell-8f1f3fa10b141de3682a378d231224cb37a68014.tar.gz
Log the error that happens on sconn.Wait()
Warning level is used because a non-nil error is logged even for successful scenarios We plan to use it for debug reasons
Diffstat (limited to 'internal/sshd/sshd.go')
-rw-r--r--internal/sshd/sshd.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/sshd/sshd.go b/internal/sshd/sshd.go
index 49b8ab9..8dbeebf 100644
--- a/internal/sshd/sshd.go
+++ b/internal/sshd/sshd.go
@@ -204,9 +204,11 @@ func (s *Server) handleConn(ctx context.Context, nconn net.Conn) {
success = session.success
})
+ reason := sconn.Wait()
ctxlog.WithFields(log.Fields{
"duration_s": time.Since(started).Seconds(),
"establish_session_duration_s": establishSessionDuration,
+ "reason": reason,
}).Info("server: handleConn: done")
}