Skip to content

Commit 8972b55

Browse files
Igor Drozdovashmckenzie
andcommitted
Merge branch '669-follow-up-from-update-gitlab-shell-version-to-14-25-0' into 'main'
Include error and log as Error when recovering Closes #669 See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/825 Merged-by: Igor Drozdov <[email protected]> Approved-by: Igor Drozdov <[email protected]> Co-authored-by: Ash McKenzie <[email protected]>
2 parents 67f5742 + 8a24dbb commit 8972b55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/sshd/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (c *connection) handleRequests(ctx context.Context, sconn *ssh.ServerConn,
132132
// Prevent a panic in a single session from taking out the whole server
133133
defer func() {
134134
if err := recover(); err != nil {
135-
ctxlog.WithField("recovered_error", err).Warn("panic handling session")
135+
ctxlog.WithField("recovered_error", err).Error("panic handling session")
136136
}
137137
}()
138138

internal/sshd/sshd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (s *Server) handleConn(ctx context.Context, nconn net.Conn) {
185185
// Prevent a panic in a single connection from taking out the whole server
186186
defer func() {
187187
if err := recover(); err != nil {
188-
ctxlog.Warn("panic handling session")
188+
ctxlog.WithField("recovered_error", err).Error("panic handling session")
189189

190190
metrics.SliSshdSessionsErrorsTotal.Inc()
191191
}

0 commit comments

Comments
 (0)