As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 8a24dbb0 authored by Ash McKenzie's avatar Ash McKenzie Committed by Igor Drozdov
Browse files

Include error and log as Error when recovering

parent 67f57421
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -132,7 +132,7 @@ func (c *connection) handleRequests(ctx context.Context, sconn *ssh.ServerConn,
// Prevent a panic in a single session from taking out the whole server
defer func() {
if err := recover(); err != nil {
ctxlog.WithField("recovered_error", err).Warn("panic handling session")
ctxlog.WithField("recovered_error", err).Error("panic handling session")
}
}()
Loading
Loading
Loading
Loading
@@ -185,7 +185,7 @@ func (s *Server) handleConn(ctx context.Context, nconn net.Conn) {
// Prevent a panic in a single connection from taking out the whole server
defer func() {
if err := recover(); err != nil {
ctxlog.Warn("panic handling session")
ctxlog.WithField("recovered_error", err).Error("panic handling session")
metrics.SliSshdSessionsErrorsTotal.Inc()
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment